I’ve been using subversion for version control on just about all my projects for years, whether they were my own projects or for clients. It worked well and I got very used to it. Recently I’ve been put on projects that use distributed version control systems and have also been working on some open source projects that use it as well. Several of my projects use Mercurial, but most are using git.
As my work on the Mercurial projects has been quite limited, I’ve fumbled my way through using it without really learning about it. MacHg has been good enough for me to work on the projects. However, one of my projects relies heavily on git, so I’ve been trying to learn it. I’ve read a number of tutorials, watched videos, read through Pro Git twice, and still don’t feel comfortable with it. After talking with some other developers, I’m not alone in being lost with git.
I consider myself a fairly intelligent person that can learn new technologies. I’m not sure why it has been so hard for me to learn git, but I’m starting to see some of the benefits of it. Another developer I work with has cursed git because he just wanted to look through a snapshot of a source tree, but with a distributed version control system, he had to download the entire repository in order to browse the code (he didn’t have access to export the source without the rest of the repository). When he first told me about this, I completely agreed with him on how ridiculous this aspect was, but the more I read (read the same material, that is), the more I’m starting to get how powerful git is.
While git is quite powerful, it is going to require me to change my workflow as git seems to encourage creating branches for every little thing. Branching code, to me, has always been avoided as it was a royal pain and merging was unpleasant. Merging can still be unpleasant with git, but everything I’ve read seems to indicate it is painless. We shall see.
I wasn’t until I found the Git Reference website that the pieces started to make sense. I’m not sure why every other tutorial doesn’t make things this clear. Maybe this should be everyone’s starting point in learning git.
I’m comfortable with command line tools, but prefer a GUI if at all possible. With subversion, I used to use Versions, but switched to Cornerstone after I tried it and found that it showed diffs right in the app without requiring an external application. Now that I’m using git, there are a number of GUI tools for it, but I’ve found that Tower is the only git app out there for the Mac that currently has diffs right in the app, so that’s my app of choice. There are some things I don’t like about it, for instance I like a list of repositories on the left side. However, it’s helping me become more comfortable with git.
Maybe I need to write an idiot’s guide to git. If a reasonably good developer like me is struggling with git, how can it become widely adopted? Is it that other developers aren’t as entrenched in subversion as I? I kind of feel like I’m missing something in how much time I’ve spent in trying to learn git.