The Spectre of Math

July 24, 2009

more git learning

Filed under: Hacking — jlebl @ 3:18 pm

So I spent some time I could have spent hacking on genius by reading about git. I think I somewhat understand the way the thing works. What exactly the commands do still remains an enigma and it seems very hard to figure out how to do simple things. Problem is that there is too many states that your changes are in. They are in a dirty tree, then they are in the index (staged?) then you commit them to your local repository then they are published to the main repository.

The bottom up article is pretty good for understanding what’s going on, though many times I’m asking myself “why? why would I ever care?” Git is written by a control freak obsessed with metadata of the changes to the code rather than the changes themselves. For example, it is now easier (though not by much) to split a set of changes into two commits. I think that is not something I have ever ever done, so I can’t mentally justify the added complexity. Git seems like a project that should have been done by somebody doing his phd thesis.

In my view, the fewer branches your project has the more chance you have of understanding what state your code is in. The problem is that changes to code are NEVER local, no matter how good of a programmer you are. Just like every chess book tells you to watch the entire board when making a move, so should every programming book. That’s why you don’t want too many branches and essentially often apply changes that were done to the tree in when it was in a different state. Such patches should be hand checked and hand applied! Git does too much magic like this, plus it by default starts branching the tree whenever you sneeze. Making a new branch should be the last resort unless you have a lot of free time.

My other issue is that it is pretty difficult to get started with git properly, especially on a large project where there is little opportunity for error. That means the startup time for a newcomer is far higher. If this was implemented to make sure more new people join gnome, I think it is seriously misguided. People who are already familiar with git are probably sufficiently at easy with the free software community that they will easily get started. People who just want to fix a few problems in the code and send back patches are going to be overwhelmed by new complexity.


  1. It might be worth looking into something like hg-git (though the project is still young). I think you’d find hg’s user interface much more familiar and reasonable.

    Comment by brendan — July 24, 2009 @ 4:43 pm | Reply

    • well, that’d be adding another two layers to go wrong, mercurial and hg-git. And another layer to figure out what it does. Really I just rant, but I guess I will keep using git since I’ve figured out how to use it minimalistically for what I need. I’m just angry that to use it in the way I want to is far more complicated and more prone to errors than cvs or svn. If I do things in the wrong order or do something wrong it is tougher for me to figure out what happened. And if someone else does something on the repository I just hope that it doesn’t screw me up because it changes some assumptions I have.

      Comment by jlebl — July 24, 2009 @ 6:32 pm | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at

%d bloggers like this: