3 reasons to switch from SVN to Git

Git vs SVN

Git vs SVN

Lot of articles have been written about SVN, Git and their comparisons. To me, 3 reasons stand out why I choose Git vs SVN when feasible:

  1. Git gives me the entire version control repository
  2. I can do local commits and keep commit history with Git
  3. Git encourages me to version control directories of importance on my file system

Just a little more detail:

Git gives me the entire repository

When cloning a Git repository, I get everything or nothing. In comparison, SVN allows me to checkout sub-directories from the repository. I prefer having the entire repository on hand. Git fits the bill.

Git allows local commits and keeps commit history local

When traveling with no connectivity to central Git repository, I find Git very valuable when looking for commit history. My working Git copy has all the commit history logs. I can look up what changes were made and why. In the same position if I had an SVN repository, I wouldn’t be able to look up local commit history.

Git allows me to do local commits. I like to do local commits regularly. In case if my change broke something, I can revert back to my previous local commit.

Git encourages version controlling other directories on my computer

I often see myself doing a git init on directories like /home/zf/thesis, /etc/vsftpd, /etc/mysql etc. It is as simple as typing git init in a directory to version control that directory. It has become a habit to do git init && git add -A && git commit -m “Initial commit” when I create a new directory with, largely, text files. Whenever I change contents, I habitually do git add -A && git commit -m “<commit message>”. It has definitely helped me.

SVN is also a good version control system and has advantages over Git that I talk about in 3 reasons to stay with SVN and not migrate to Git.