Thursday, August 6, 2009

git - One command to rule them all.

I have only recently learned the joy that is git. For the longest time I thought "SVN works for me why learn a new version control system." Well, as cliche as is sound, you don't know what your missing until you've used it. Two things really impress me with git, the ease of branching and the ability to "commit changes" to a local repo without "push"ing them to the main repo. These two features really put git significantly above Subversion.

Needles to say, after seeing the light and deciding that git is the way, I wanted to migrate one of my subversion projects to git. So I googled "converting svn to git" and found quite a few answers out there. The OS X solution was:

port uninstall git-core
port install git-core +svn

and...
git-svn clone SUBVERSION REPO

However after running the uninstall and reinstall no magical git-svn command showed up. This frustrated me to no end for the better part of an hour. Until I found a blog post that informed me that git had spiffied up the git tools. The new syntax is apparently:
git svn BLAH BLAH BLAH

So essentially a series of 'git-*' commands have all been distilled down into the main 'git' command, which is really neat. Less executables to clutter up tab completion lists, and one stop shopping for all your git needs. I think this is really important so let me repeat it, commands like "git-svn" have for the most part been replaced with "git svn". Spread the word.


1 comment:

  1. One more thing, here is a tutorial that gets it right: http://pauldowman.com/2008/07/26/how-to-convert-from-subversion-to-git/

    ReplyDelete