I spent some time migrating to Git this weekend. For those that aren’t familiar, Git is a distributed version control system. Unlike a centralized VCS model like Subversion with one main repository that all participants check out/into, Git gives each participant their own local copy of the repo and then provides the necessary tools to push, pull and merge between them all. As the sole developer of my code, I wasn’t really expecting a big benefit from this though and was really just doing it to learn about the new kid on the block.
I have an hour and a half commute one way, and spend about 1 hour of that on the train hacking. I usually commit when I get home in the evening (my repo is on my web server). This often means that my commits contain half finished changes, which kinda sorta defeats the purpose of version control (even if I am just one developer). One of the things that I really like about Git is the ability now to commit locally. I can commit each change as I finish it and have that all preserved when I push everything up to my “main” repo on the server.
Git also makes it really easy to create branches locally, which is another feature that I was really missing, even though I didn’t realize it. Because of the scatter shot way I do development on this blog (add something over here, a little something over there), it’s happened more than once were I have changes in my working copy that can’t go out because they’re half finished, but I really want to push out this other cool, new feature that I can’t wait to get out. With local branches, I can now branch and merge as much as I want, working an any number of features at once and never getting “stuck” with a changes that aren’t ready to go out.
All in all I’m pretty impressed with Git, both the internals and just the overall flexibility it allows in workflow and process. I’m looking forward to working on a project using it with other developers.
blog comments powered by Disqus