Should I try Git if Svn/CVS/other works for me?

June 1, 2009 – 6:22 pm Tags: , ,

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:

  1. 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.
  2. 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.
  3. It’s fast
  4. 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!

Share this:
  1. 12 Responses to “Should I try Git if Svn/CVS/other works for me?”

  2. Thanks for this post, now i feel eager to give git a try. Committing individual lines is just gold worth!

    By Mathias on Jun 1, 2009

  3. If you don’t want to lose some of the benefits of svn — canonical repository, ACLs, usage of externals, etc — you might want to try out git+svn. I’ve been using it for almost a year now with ZF development, and it’s like having the best of both worlds.

    I presented a short uncon session on it at php|tek:

    By Matthew Weier O'Phinney on Jun 1, 2009

  4. What about Google Wave? It looks like it could be done for source/version control as well.

    By Daniel on Jun 1, 2009

  5. @Matthew: Thanks for the advice, sounds like an very interesting idea. I didn’t realize that externals are missing from Git.

    @all: do you have some recommendations for Git GUIs under Windows? Something TortoiseSVN-like would be great.

    By Matthias Zeis on Jun 2, 2009

  6. If you get Git for windows it comes with some gui tools. The installer lets you choose to put “Git shell here” and “Git GUI here” commands to the right click menu in Windows Explorer. You can also run the git gui from the shell with “git gui” (surprise)

    By Jani Hartikainen on Jun 2, 2009

  7. I’d vote for Git as a front-end to Subversion (git svn), I’ve just started writing about my experiences doing just that.

    Git: easier file handling, branch merging, and more freedom to experiment by branching. I think it actually makes coding more fun.

    Subversion: covered by Matthew above, plus the fact that I’ve already got a lot of existing svn repos in my deployment scripts.

    I’m finding more of my new work is Git only… shame about svn:externals though.

    By James Whinfrey on Jun 2, 2009

  8. Thanks Jani, I will definitely give it a try in the next few weeks.

    By Matthias Zeis on Jun 3, 2009

  9. Git is really take an edge on svn when you have multiple people involved (or if you are working on different problem at the same time) It’s much easier to manage a project by creating local branch.
    And it’s so much faster !!

    By Olivier Bregeras on Jun 3, 2009

  10. Branching and merging with Git works, for me, so much better than Svn. I’m glad I made the move. And of course there’s GitHub :-).

    By Htbaa on Jul 14, 2009

  1. 3 Trackback(s)

  2. Jun 18, 2009: Should I try Git if Svn/CVS/other works for me? |
  3. Dec 18, 2009: TankWar has online mode again: This time on Opera Unite | CodeUtopia - The blog of Jani Hartikainen
  4. Feb 13, 2010: TankWar has online mode again: This time on Opera Unite « Blogs

Post a Comment

You can use some HTML (a, em, strong, etc.). If you want to post code, use <pre lang="PHP">code here</pre> (you can replace PHP with the language you are posting)