Let’s look at the wonderful world of git, (the Version Control System) and the popular GitHub service that makes creating, developing and sharing code fun and easy.

Git is open source but GitHub is a for-profit company (and not to be confused with Git). GitHub is by far the largest code repository out there!

Lets take a project folder,( this is what we refer to as repository.) and say we wanted to save it. The save we are going to do is not the normal save, but to take the snapshot of the whole repository as it is. The snapshot here is called commit. Not only can we write comments and share this among people, but we can also go back to that snapshot whenever we wish to.

Imagine we are making these commits the whole time and we get some crazy idea (maybe, add some feature), we can create something called branch. A branch is essentially a new development path that we can follow as long as we like without messing up with our master development plan.

Say, I have a typo in one of the commits and my buddy figures it out. He’s generous enough to make the necessary changes by making his own branch (and fix the errors himself) . After he’s all done, he can ask me to pull in his changes by using something called Pull Request. If I accept the request, that branch is merged with the master branch.

GitHub is built to be the place to host the repositories. When we put our repository on GitHub, we then have a centralised place to distribute the code from .

Say, I have my repo on GitHub,and I pull the code to my local machine and make a few edits, and I’ll commit my edits. Then, I push the code from the local machine to GitHub. Now that my updated code is on GitHub, its easy to invite friends to share the code or distribute something to the world!

Suppose I have a repo and you are interested in the code but you want to use it for a different purpose. GitHub allows you to fork my repository and make the changes you desire and it creates an entirely new repo for you to manage on your own. Fork is a part of your github account. You can even raise a pull request from your fork. This is how large open source projects are done.

Besides all this, Github also offers a free static web hosting.