I’ll admit it took a while to convince me of the merits of decentralised version control. But after a really nasty couple of merges, enough was enough. We’ve dropped SVN in favour of Git - which seems to be the biggest contender.
The main selling point for me was that it keeps track of all the metadata surrounding merges - information which SVN forgets about, requiring you to document your own merge metadata in commit messages, and scour the SVN logs trying to figure out which changesets have already been merged, when, whence, whither, by whom.
Other wins:
- It’s really fast
- Easy creation and painless switching between local ‘topic branches’, which you can create for each feature you’re working on and merge into eachother easily
- Easy to swap work-in-progress patches with other developers without having to commit to a centralised trunk
- Easy to make lots of quick local / offline commits, which you can later crunch down into one whn merging, if you want
- Have the whole history available locally, and lots of backups of the repository
Some minuses:
- The git-svnimport tool appears slightly buggy. Don’t count on it to import your SVN branches properly, especially if you moved them around at any point in the SVN history. In our case the branches it created only contained the files which had changed since the branch was created in svn - rather than fiddle around sorting them out, I just deleted them and re-created them from the git master branch by applying an svn diff. Which is OK if the history of your branches isn’t super important, but less than ideal otherwise. I also found that a small number of files were missing from the trunk, and had to be re-added manually - I suspect git-svnimport gets a bit lost when files have been moved around in non-trivial ways in the SVN history.
- There is something of a learning curve with Git, especially when it comes to more complex merging, branching, tagging, cherry-picking tasks which were the reasons I first wanted to move to Git. I found this set of lessons learned helped a lot, ontop of the ‘Git from SVN’ tutorial. Once you know what you’re doing though, it’s faster and a lot less fiddly at merging than SVN.