I’ve been using Subversion for quite a while, and while it has some minor annoyances like complex merging, it never really bothered me.
Then along comes Git, touting that it’s easy and that you’re stupid if you don’t use it. The technical stuff people said about it were impressing, but not enough to actually warrant trying it for me – Afterall, I was quite happy with svn, as it did what I needed.
After a while, I decided I wanted to try Git anyway – just out of curiosity, to see if it actually was so amazingly much better. And in this post I’ll tell you if it was
I’ve been using Git for a while now with some small projects – nothing very large, so bear that in mind: some Git features are probably more useful with bigger stuff.
The main functionality of Git is pretty similar to what Subversion has, git add, git commit, etc. – of course there are some minor semantic differences, and then there’s the whole local/remote repository concept.
Overall, I think Git is as easy to use as svn is, and there is also a GUI which makes certain tasks simpler.
Feature-wise in my testing I’ve found that while some features in Git are convenient, it doesn’t really have any major advantages over svn in my use. However, I still prefer it over svn.
Why Git over Svn?
There’s a lot of stuff on the net on what makes Git better than some other version control system, such as Why Git is better than X, which is good for an overview of Git’s features vs. some others.
Here are some reasons that I’d like to add, as many sites only list the technical aspects:
- You can commit only specific lines. I often modify some files, adding more than one feature. I might have a bunch of files and only one of the features is complete, so I don’t want to include the modifications related to the incomplete one in the commit. With Git, I can choose only the lines that are relevant to the commit, and include those.
- You can modify the commit, for example if you forgot to include a file in the commit, you won’t need to make a new commit for it. I often forget to include a file in a commit, so I keep making additional commits with the forgotten files – and I don’t like that.
- It’s fast
- You can “stash” your work – put your modifications away to a safe place and reset the files to the latest revision, and you can later get the modifications back easily
So should you try it?
Yes! Absolutely. I wasn’t convinced by just reading other people’s opinions about it as they never quite covered the things that I appreciate about Git now that I have tried it, so you too should definitely try it as it has a lot of useful features.
It may not be amazing enough to warrant moving all your existing repositories over to it right away, but I think it’s still worth giving a shot – who knows, maybe you have use-cases that I don’t, where Git can help you become more productive.
If you’re going to try Git, do check my post with Git tips for SVN users!