A First Look at Git - A Version Control System

Git is a fast de-centralized version control system. Unlike Subversion, CVS, Perforce which are centralized version control syste, GIT stands uinique in fast speed, distributed approach and non-linear development.Git was written by Linus Torvalds 5 years back. Most of the large projects like Linux Kernel, Xorg, Perl, Android, Qt, Ruby, Debian, Eclipse,GNOME,Wine etc runs on Git.

Lets have a look at how Git works !!!

Git can run on Windows, Linux and Mac too. The Latest stable version is us start with installation of git on Linux (Fedora 14) as follow:

One can easily install Git through yum utility provided you have internet connectivity. For manual installation, we need to install dependent modules which is out of scope for this article.

Once git is readily installed, we go ahead creating a new project. Here we have a new website project by name "Website" which contains few files and folders in it. Lets see how to go ahead.

First we need to create global username for the git repository plus email registration. These are optional field but since we would require during git-hub(will explain later), lets create the one as shown

Next, we create a git repository as shown below:

#cd Website
#git init

Once repository gets initialized, then add the files to the repository as show

#git add .
#git commit -m "Initial Commit"

The above git add . will add up all the files/folders into Website repository.

Lets check the logs for whatever commit changes we have made to the repository:

 The above screenshot shows that Ajeet  is a user which has added the files and did the last commit.

Hence, we have created  a git repository with name "Website".

In next session, we will discuss further with git-hub and other advantages of git.

No comments:

Post a Comment