My thoughts on Git

I have been working with Git for a while now, and I have a few thoughts about it. I am used to the SVN model, where multiple developers check out of a central repository, make changes locally and then commit them back to the repo (and repair failed merges). While SVN is not perfect, at least I am comfortable with it and know what to expect from it. While some of my issues with Git may relate solely to my relative unfamiliarity with it, at least it seems like I am not the only one with issues.

In reading through the man pages and all the documentation I can find on line (including the Git – SVN Crash Course) I was totally unprepared for what actually happens. According to the Crash Course git commit -a does the same thing as svn commit, but that is not quite the case. After a commit the files still need to be moved to the repo. So as I am looking for the best way to do that I find git push. Well, it would seem to me that firing off a git push would mean that I want the files I have modified and committed to merge into the repo I checked them out of. But that isn’t quite what happens if there are any working directories checked out the repo (meaning the one you are working on). It seems that the only way to properly get the files back into the repo is to issue a git pull from the repo aimed at your working branch. Hans Fugal said it best in his post from last year: git-push is less than worthless.

What this means is that I am unable to easily move changes from my laptop to the server. Instead, in order to reduce the number of steps I need to take I check out the repo I am working on (git clone) in my home directory on the server and then use sshfs to mount that directory locally. I do my work there, and then ssh in to the working directory, fire off git commit -a and then cd to the repo to pull from the working directory. Of course this seriously hampers my ability to work offline (as in I can’t). While I am sure there are plenty of good things about Git I am not yet really seeing them. With the exception of git stash I have yet to be wowed by anything Git has to offer. In the interest of fairness, however, I have not been incredibly wowed by anything SVN has to offer either, I just find it easier to use.

One Response so far

  1. 1

    John Reeves said,

    June 2, 2009 @ 7:58 am

    I still haven’t tried Git. I find the whole decentralized code control system interesting though. I decided to try out Bazaar (well, it was more like my only choice for the code I wanted to look at). It is also decentralized but newer. It allows you to do most (all?) of what Git does, but also allows you to do a SVN-like checkout of a branch. Then you can pass a switch to “bzr ci” what makes it check in locally. When you eventually do a normal commit, all changes are committed to the central repo, etc. I used it a while for when my internet was down. It seems pretty nice, and I’m pretty sure I’ve hardly scratched the surface for some of the cool stuff it can do.

    And its written in Python, so you know its good.

    Oh, and 12,450 spams.

Comment RSS