Brief History of Version Control Systems, DVCS Advantages and Git Installation

Hi, I am Malathi Boggavarapu and welcome to my blog.

This tutorial describes brief history of Version control systems, Advantages of DVCS which means Distributed Version Control Systems and also we will learn about Git and it's installation on Windows. I have a seperate post "Git Fundamentals" in my blog which explains everything about Git but i had broken them down to smaller sections to make it easy for everyone to follow. This post will only introduce you to Git.

So let's get started.

A brief history of version control

First generation

The very first version control system were developed in early 70's and operated on a single file and had no networking support.These were the systems such as SCCS and RCS. They are operated on a single file so that you will have a file such as foo.c and have multiple versions of that file. But there was no correspondence between different files within the repository. There was no notion that version 1.1 of foo.c work with version 1.1 of bar.c. It could be arbitrary. So we only had single files. This lead to the innovation of having a multi file system or the second generation.

Second Generation

This is typified by centralized version control system such CVS, VSS, SVN, TFS and Preforce. All of these are multi files centralized system so that you can checkout into a working copy on your local system, all of the files necessary for particular version of a repository.

Third Generation

Along came the third generation which are the Distributed Version Control Systems such as GIT, Hg,BitKeeper and Bazaar. These work on ChangeSets. These ChangeSets can be shipped around and both client and servers can have the entire repository present which allows us to do the interesting things.

If you want to read more about the history of version control, refer to the article
http://www.ericsink.com/vcbe/html/history_of_version_control.html

Advantages of DVCs


Some of the advantages of DVCs over the centralized one is the ability to have different topologies.

Different Topologies

1) If we want to use Centralized model, we still can by having the developers push their changes to central repository. This is commonly done in enterprise environments.

2) we can also use Hierarchial model. It has developers pushing their changes to sub-system based repositories and those sub-system based repositories are periodically merged into a main repository.

This is done in Linux kernel development because linux kernel is very large. There are seperate sub-system repositories like graphics, networking file systems and other portions of linux kernel. those sub-system repositories are periodically merged with main linux kernel so that development can continue on its way

3) We can also use a Distributed model where developers push their changes to their own repository and the project maintainers pull changes to official repository if they deemed valuable. This is very common in open source projects on GitHUB where if we want to contribute changes, you can fork main repository, make your changes and issue a pull request to the project maintainer.

Another advantage of DVC's is backups are extreamly easy. A backup is simply the clone of repository. So if something happens to your main server, simply standup the other server and clone the repository to it.

About Git


Git was created by Linus Torvalds, who also created Linux. Git creation was prompted by Linux-BitKeeper separation. BitKeeper  is a commercial DVCs that is used by Linux kernel team from 2002 to 2005. When BitKeeper decided to stop supplying the linux kernel team with free licenses of BitKeeper, Linux started Git project in 2005 to create their own DVCs. It is written in Perl and C and runs on wide variety of operating systems including Linux, Mac OS 10, windows and many other commonly used operating systems available today.

Its main design goals include Seed, simplicity, Strong branching and merging support, a fully Distributed nature and to scale well for larger projects. Remember this was designed to be used on linux kernel which is a very large piece of software



Installing Git on Windows


Now let see how to install Git on windows

msysGit (http://msysgit.github.com)

Go to the website and click on Downloads link. Download the latest version of git and launch the installer. Now Git setup wizard will be opened. Go through some general setup information of your own choice. I am only discussing about some important setup information. If you see below picture, if you want 'Windows explore integration', i would recommend using Git extensions. Stay away from Tortoise Git as that is older project and much more closely mimics Tortoise SVN and does not explore full power of Git. Leave the rest of the options as is.




Clicking on Next to Next button, we see the below wizard. This is one the important menu item. By default it is the first option 'Git bash'. But if we want to include unix tools on windows command prompt, chose the last option. It will only replace windows find commands with more powerful unix commands. So if you can choose according to your interest.



By default Git only have line feeds(LF) in the repository. In windows we use both Character returns and line feeds to know line endings. Some people advocate 'checkout as-is, commit as-is', so your repository will have character return line feeds and it really depends on whom you are sharing with. If the project is cross-platform project which is going to build on Unix, Mac and windows, we should chose the first option. If you are working on windows only project, chose the last option.




Clicking on Next, will install Git. Now go to Git bash

git --version - Shows the version of the Git installed.
git init - It creates a repository test which assures me that git is working on the system

Look at the below picture to understand in an easy way.



















So we came to the end of the session. Hope it is helpful. Please post your comments and let me know your questions and valuable inputs.

Follow my other posts on Git which were mentioned below

Configuring Git in your computer
Working locally with Git
How to Git clone your remote repository
Git Fetching, Pulling from Remote repository and Pushing to Remote repository
Git - Creating, Verifying tags and Pushing to Remote repository
Git - Branching, Merging, Rebasing and Cherry-picking

Happy Learning!!!

Comments

Popular posts from this blog

Bash - Execute Pl/Sql script from Shell script

How to get client Ip Address using Java HttpServletRequest

How to install Portable JDK in Windows without Admin rights