Comparison of Git and SVN

sougata wrote this on 15 Oct 2012

A version control system (VCS) is a repository of files, often the files for the source code of computer programs, with monitored access. Every change made to the source is tracked, along with who made the change, why they made it, or comments.

Version control systems are essential for any form of distributed, collaborative development.

There are two major Version Control system,

1.Centralized version control systems like SVN

2.Distributed version control systems like Git

1.Centralized Version Control System(e.g. SVN):

From name itself we can make out centralized version control means source code would be present in a centralized repository. Every developer checks in and checks out the code from and to the central repository.

2.Distributed Version Control system (e.g. GIT):

In a distributed VCS like Git every user has a complete copy of the repository data stored locally, thereby making access to file history extremely fast, as well as allowing full functionality when disconnected from the network. It also means every user has a complete backup of the repository. If you have 10 developers team, you probably have minimum 10 complete backups of the repository. If any repository is lost due to system crash only the changes which were unique to that repository are lost.  Where as in case of centralized VCS like SVN only the central repository has the complete history. This means that users must communicate over the network with the central repository to obtain history about a file. Need to take backup periodically of the central repository. In case of system failure it must be restored from backup and changes since that last backup are likely to be lost. Depending on the backup policies in place this could be several human-weeks worth of work.

Git does not depend on a centralized server, but does have the ability to synchronize with other Git repositories to push and pull changes between them. This means that you can add multiple remote repositories to your project, some read-only and some possibly with write access as well, meaning you can have nearly any type of workflow you can think of.

The Major Differences between Git and SVN

1.Git is Faster:

Since all the operations are local (e.g. Perform a diff,View file history,Commit changes. Merge branches. Obtain any other revision of a file,Switch branches.) Git is much faster than SVN

2.GIT stores content as meta data, SVN stores just files:

All source control systems stores the meta data of files in hidden folders like .svn, .cvs etc., whereas GIT stores entire content inside the .git folder. If you compare the size of .git folder with .svn, you will notice a big difference. So, the .git folder is the cloned repository in your machine, it has everything that the central repository has like tags, branches, version histories etc.

3.Git clones the repository:

Subversion allows you to check out just a sub tree of a repository; Git requires you to clone the entire repository (including history) and create a working copy that mirrors at least a subset of the items under version control.

4.Simpler Branches:

Git branches are simpler and less resource heavy than Subversion’s.Branches are used to develop features isolated from each other. The master branch is the “default” branch when you create a repository. Use other branches for development and merge them back to the master branch on completion. In Git a branch is not available to others unless you push the branch to your remote repository

5. Git repository file format are simpler:

Git repository file formats are simple, so repair is easy and corruption is rare.

6.Repository Backup:

Backing up Subversion repositories centrally is potentially simpler since you can choose to distributed folders within a repository in git


SVN UI’s are mature.

Visit us at to know more about our offerings.

facebook comments:

Leave a Comment