Welcome to the third and final day of Git Week! If you missed the first two installments, go check them out:
- Monday: Learn what Git is and why it’s so freakin’ awesome!
- Wednesday: Get started with Git
Now you’ve learned some git commands, a great place to start practicing them is Github. Github is a social site that allows developers to collaborate on projects, to discover and contribute to open source projects, and to showcase what they are working on. Github is filled with many top open source projects with significant developer support, and has issue/bug tracking system. Moreover, it is a community for developers that are open to sharing and mutual learning.
Furthermore, simple sites can be easily and freely deployed on Github pages. Documentations for popular repositories are often deployed using Github pages. The best part of using Github pages is that they are simple and free.
Collaborating using Git
The next four commands are very useful when you collaborate with others on your codebase, which is the best thing that you can do with Git!
git clone [url]
When you are working with others, a great place to start is by copying the codebase to your local machine. You do this with the git clone command. This command creates a new directory from an existing repository.
If your fellow developer has just pushed some new code to the remote branch and you want to have a copy of that code, all you need to do is to type git pull to copy the changes. If you have local changes that are not committed, you can either commit them or stash them if you are not yet ready to commit.
When you have code that is a working state and not ready to be committed, this command allows you to temporarily stash your local changes so you can work on something else that urgently requires your attention. You could git stash before you git pull, and reapply your changes on top later.
git stash apply
Use this command to apply your changes on top the changes you may have just copied to your local repository and reassume your work.
There are many other fascinating and incredibly useful commands from github. To dig even deeper, go check out the documentation.
Git the bug?
Don’t worry! There are lots of ways for you to git your fix.
Podcasts from Github
The changelog from Github is a great way to stay abreast with best and latest in frameworks, tools, and languages. The changelog contains podcasts which usually feature industry leaders and give a great starting place to be inspired with new ideas that you may want to work on.
Events from Github: Github Drinkups
Becoming a user of git and a member of github also means that you are now a part of the community. This community often hosts events called Github drinkups all over the world, so go out and meet like minded people and have fun with git.