I have been asked to justify moving a small team over to git from CVS/SVN.
So far, from my reading, I can identify three key benefits:
- Speed
- Easy branching
- Distributed
- More features that SVN just doesn't offer (partial file commits, staging etc...)
Speed
There are some arguments in favor of git because of its speed, however, a common respond to mentioning Git's superior speed is that the difference between 3 and 13 seconds is negligible.
A real life example:
I do a load of work during the day and commit the stable stuff in the evening before I go home.
On a big commit, where I have added several hundred files as well as changed, moved and re-factored existing ones, CVS will perform the commit before I can put my coat on and tidy my desk. How would this be different with git?
Easy branching
Git's branching is lauded by many as one of it's strongets feature. However, branching in CVS/SVN seems to be sufficient to many engineers, especially with modern IDE that make the entire experience and workflow almost identical irrespective of which RCS is actually used.
When I want to try out an idea, I right click my project node in Eclipse, select "Switch to different branch", select "new", type the name and I'm away, committing and updating without 'polluting the mainline' as CVS apparent does. When I have decided that the new ideas in this branch are stable and good, I right click the project again, select "merge with another branch or version", select HEAD and we are back in HEAD but with working changes implemented... How would git improve my experience?
Truly distributed
The main advantage in using a distributed RCS seems to be disaster recovery. However, similar properties are inherent in CVS and SVN as well. This is particularly the case for standard practise usage:
Now I consider it standard practice for the first thing to do in the morning is check the repository for any changes made over-night and do an update/merge if needed so, should I go home tonight and find my repository has been burnt to the ground in the morning, I would of lost...well...nothing. I would create a new repo, commit my local files to the server, the other 5 employees would do the same, there would maybe be a bit of merge fuss but no more than there would of been had we of been committing our local changes to an already existing server and we are away once more. No big deal.
GIT Staging
Another feature that is often mentioned is the staging area. This has no equivalent in SVN/CVS and allows a developer to 'craft his commit' to include on the files you want.
Often, when this is mentioned, I simply think of changesets. How is the staging area different?
Indeed, I even see some disadvantages of using Git:
- Local commits mean that the likelyhood of loosing code is greater, as my development machine is much more vulnerable than our SVN server, and my work is at risk before I push it to our common repository.
- Offline working has no perceptible advantage, since most developers will never work on a project while offline.
I feel as though I must be missing or misunderstanding something fundamental about git and am having a hard time justifying the business case for the switch. I would greatly appreciate your input to better my understanding of the issues involved, especially if you can you identify concrete use cases where git would be a fundamentally superior solution than CVS/SVN rather than simply an incrementally better one?