Saturday 21 September 2013

git, Versioning, Github et al

As soon as you start talking about coding, coding projects, applications some words that you may often come across are "git", "Subversion", "Version Control System" etc. So what is this?

First of all, let me warn you that it took me a long time to understand this. So it may take you some time too.

Versioning is the systematic management of the code that you have so that you have a project that is well documented in every sense. You can find out which line of code was added by which member of your team as easily as possible. And make sure that mistakes/bugs were introduced when some change was made then you can roll back the changes and go back to the version as it was before that bug started occuring. It often happens in Software engineering that many people are working on the same project and more often than not, many people are working on the same file. This would lead to a lot of confusion if there was no proper system to maintain a log about who is doing what. Enter Version Control System(VCS).

VCS maintains a log of historical events about the state of the project.

git is an open source versioning system. It is used by many big software companies. There are also some other systems like subversion., mercurial etc. I have personally used only git and I have loved it.

In git, Historical events are called commits. Each commit is associated with a timestamp and the identity of the person who performed the commit. This makes sure that no change goes unnoticed. And the project administrator or for that matter any person who is working on the project can pull up the list of commits that have happenned on one file, the whole project et al. All kinds of features such as branches, Merging branches etc are there on git.

Branches is something that I would like to make a special mention on. It often happens that during the development of a project, the development could go on a completely different track. These changes are not directly related with the project and are just auxillary chages that are required to change some file that is directly related with the project. At this time, creating a branch and then working on this branch rather than working on the master branch is often beneficiary.

Github is a free server to host git projects. You can sync projects directly from your PC to the Github server and then access it from anywhere using only a web browser. This also ensures that you have asecure backup of all your projects(also called "repositories") on the server. Though the free version of Github provides only free repositories, it is a very good way to make sure you have secure backup. These public repos are available to anyone who enters the correct search keyword! This does not make much difference to the new programmer(like you!). But it may make some amount of difference to the advanced programmer, and generally advanced programmers upgrade so as to get Private repos.

So, this was all about git, github, versioning.

No comments:

Post a Comment