Friday, September 24, 2010

Enjoying Git

OK, I admit it.  This is awesome.  I'm still getting used to committing to PostgreSQL with git rather than CVS, but it's sort of like the feeling of being let out of the dungeon.  Wow, sunlight, what am I supposed to do about that?

Actually, I've never really been into CVS bashing; it's an OK system for what it does.  And compare to RCS, which I actually used once or twice a long time ago, it's positively phenomenal.  But git, despite its imperfections, is just a lot better.

There are two major things that caused problems for me when committing to CVS.  First, it was painfully slow.  Second, since I was doing all of my development work on git, that meant extracting the patch, applying it to CVS, making sure to CVS add/rm any new/deleted files, retyping (or copying) the commit message, and double-checking that I hadn't messed anything up while moving the patch around.

$ git commit
$ git show
$ git push

Nice!  I feel like someone gave me an easy button.


  1. I remember reading some time ago a post of yours discussing how you worked on the PostgreSQL source, and you wound up figuring that git was by far your most-used command; but then also reading a later post that the pg cvs-to-git conversion kept hitting snags and was not done. The confusion about how those two facts could be simultaneously true has now been resolved.

    I've found git to be fairly useful, but mainly because it can be used to access the full history of a project, even without network access. The fact that branches are not simply code copies of the repo in a different directory is also awesome. Strangely, I needed to actually use these features before their coolness became apparent.

    I've only read positive thoughts on moving to git for the project source. Were there any arguments towards keeping CVS, or was it pretty much unanimous?

  2. I think by the end we were pretty much all in agreement. Some people held out longer than others, based on their relative degree of familiarity with/confidence in git.

  3. I know this isn't fair, but I was secretly hoping for Mercurial, given a somewhat lower learning curve.

    Most hackers seemed to say git of course, I suspect because a few were using it already :)

    Python is in mercurial so I've got more experience there.

    I actually like the more centralized development approach postgresql has adopted so far.

    Atomic commits was the biggest saving grace for me in the switch. It's very clearly more correct.