Git vs SVN for bosses
We switched to Git this morning. Before making this switch Gert-Jan (CTO of Floorplanner) asked me: “what is the advantage of Git over Subversion?”. I answered him and thought I’ll make a post of the answer as it can be useful for other bosses like Gert-Jan.
Since we started using Subversion, which was a couple of years ago, using a code versioning tool helped us a lot. We could work on Floorplanner with the whole team together without storing the “repository” on our remote FTP location (early days) or emailing changes up and forth (ancient times
). But when working with Subversion for some time, little things started to bother, i’ll sum them up:
1. We needed tutorials for creating a branch in SVN every time again
2. When merging the branch back, SVN didn’t know where that branch started.
3. When merging the branch back, each change was recorded back as the user who did the merge.
The consequences of these disadvantages.
We avoided creating branches.
Why is not creating branches bad practice?
I’ll give you an example. Sometimes when we were working on some big feature, we didn’t create a branch (it was a lot of work), we just committed it into the trunk when it was “kinda” ready. Then a sudden exception in the software that was online occurred, we now had a problem! That bug had to be fixed NOW, but the changes we just committed into the trunk were not fully tested and couldn’t go online. You understand this was a tedious process and resulted in more downtime sometimes.
But why is Git better?
1. Creating branches in Git is a lot easier than doing this in SVN.
2. Git keeps track where branches come from. So when creating a branch, merging back is very simple.
3. It keeps commit messages intact, when merging.
Conclusion
The whole point, remember this post is called “Git vs SVN for bosses”, branching is a joy in Git and this results in better being able to have access to different versions of the same software at the same time, which again results in being able to fix that bug NOW.






December 14th, 2008 at 6:04 pm
In my opinion, there is another important reason why one should use Git as version control system if you are developing a Rails application. As a Rails developer, you are part of the Rails community and ecosystem. Most Rails developers and related projects have switched to Git by now. It makes your life much easier if you switch to Git as well because of three reasons:
It basically comes down to a “me too”-attitude, but you can see this attitude yields some advantages.
December 14th, 2008 at 7:33 pm
[...] Jaap finally convinced Gert-Jan, we have moved to the Git version control system for the main Floorplanner repository. Now we can [...]
January 4th, 2009 at 9:16 pm
Subversion 1.5 added merge tracking. Seems like a shallow set of reasons to drop all the existing tool support for subversion and switch to an entirely new VCS.
January 4th, 2009 at 9:25 pm
Willem —
Forking a project to maintain compatibility is band-aid for a broken project. If the project does not maintain a stable API, that’s a problem they need to fix, rather than forcing every single downstream client to maintain compatibility across the project’s lifetime.
If you need to make your own local changes to the project, these should be submitted upstream to release yourself from the maintenance overhead, and benefit the others using it. If your changes are local hacks, either you should reconsider your reasons for hacking up the project, or this demonstrates the project lack of extensibility and apparent unsuitability for the task at hand.
These arguments seem to be about facilitating the use of bad code and poor practices. That’s not compelling.
January 5th, 2009 at 6:37 pm
In a perfect world, you would have a point. Unfortunately, the Ruby on Rails world, which is most relevant to us, is not stable. APIs change from time to time, relying on the internals of the Rails framework causes problems every few releases, plugins change frequently, etc. This immaturity of the framework is not ideal, but it is the situation we are facing.
Git makes managing this situation much easier: You can create local forks of projects that you know work for your project. Because git is distributed, it is very easy to incorporate changes from the official branch.
About tools: this depends on what you are used to. I always used the command line interface client of SVN, so switching to git wasn’t really hard. It would have been much more difficult if I was used to tools like SVN integration in Eclipse or TurtoiseSVN.
March 19th, 2009 at 8:41 pm
Uh. I’m pretty sure it’s damn easy to create a branch in svn. It’s simply an svn copy command from the trunk directory to the branch directory.
March 19th, 2009 at 9:14 pm
You’re right creating is easy, merging it all back is somewhat mre complex :p
March 24th, 2009 at 4:30 am
Merging branches is not hard at all with subversion 1.5
to create the branch…
“svn copy ”
to merge the branch back into trunk…
“svn merge –reintegrate ”
Subversion 1.5 has been out for nearly 10 months now.. (and 7 months at the time of the post’s writing). If you havent kept track of your dev tools for 7 months, then its entirely your fault that merging was hard! Surely ruby developers are used to the whole keeping up thing with how fast ruby changes…
March 24th, 2009 at 4:33 am
humm I always forget certian things will get scrapped by comment filters
to create the branch…
“svn copy URL_TO_TRUNK URL_TO_BRANCH”
to merge the branch back into trunk…
“svn merge –reintegrate URL_TO_TRUNK”
May 29th, 2009 at 9:56 am
If you’re developing in Windows, you may also want to consider Mercurial which gives pretty much the same advantages as Git only with Windows support (TortoiseHg, etc).
June 30th, 2009 at 3:11 am
So SVN or Git?
Then you have Perforce, Mercurial, Launchpad with Bazaar, Visual Source Safe and so on. (CVS is kind of dead…)
SVN can’t (easily) lock a tree, Git is “all or nothing” access rights (and hates your Windows), others have their own quirks as well.
So again: It depends on the project which one you will use most efficiently.
It would be useful to have a real and objective comparison of these solution, so each project with a short reading could decide which solution is the best for them.
June 30th, 2009 at 9:50 pm
I found this presentation of Scott Chacon on git very useful! http://scotland-on-rails.s3.amazonaws.com/1A02_Scott_Chacon.mp4
July 23rd, 2009 at 10:00 am
SVN 1.5 does have merge tracking yes, but it doesn’t have the property of preserving the original authorship attribution on the merged commits, which I consider very important and a primary reason why my workplace should switch to git.
Unfortunately, convincing everyone else we should switch to git, including the management, is not likely to be easy.
August 3rd, 2009 at 12:48 pm
[...] Git vs SVN for bosses (Stupid I think) [...]
September 18th, 2009 at 5:48 pm
I think git vs subversion is a topic that one can debate till the world ends.
I have used both git and subversion. Both has its strength and weakness. I could not find one better than the other.
Git uses distributed repository concept and support private branches and quick merges etc. This is extremely useful handy in indepependent and experimental software development.
Subversion uses centralized repository and is useful for organizations that want to keep the source control very tight and look for an integrated development environment.
All these boils down to your development philosophy. With subversion 1.5, branching is not that very difficult.
So a choice may be made based on your development philosophy and your need. Trying to find the best and using it will not be a viable solution.
November 2nd, 2009 at 10:28 pm
[...] Git vs. SVN for Bosses: http://techblog.floorplanner.com/2008/12/09/git-vs-svn-for-bosses/ [...]
November 8th, 2009 at 4:07 pm
Hi, i don’t think there is a debate about witch one is the best between SVN and GIT. The thing is witch one suite the best the need you have. If found this website talking about the pro and con of GIT vs SVN.
http://git.or.cz/gitwiki/GitSvnComparsion
It’s based on SVN 1.5 hope this will help some of you to choose your best!
November 11th, 2009 at 10:11 am
[...] [...]
February 20th, 2010 at 2:49 am
[...] Git vs. SVN for Bosses: http://techblog.floorplanner.com/2008/12/09/git-vs-svn-for-bosses/ [...]