Friday, October 15, 2010

Git-SVN Bliss

So my dev team likes and knows Subversion. I like and know Git. Can they exist together? Sure!

Using git-svn, I can use git locally while they use the bloated bastard that SVN is. I can make smaller commits, push and pull between my home and work machines, and send all my commits at once to the SVN repo on our server. All while using the merging awesomeness that git has.

How easy is it to use git-svn? Extremely simple.

git svn clone http://your-svn-repo-url reponame

That sets up the repo. How to do 'svn up' and merge? git svn rebase. How to push your commits to SVN? git svn dcommit. How to change branches/tags? git reset --hard remotes/branchname. Before you reset --hard, either commit and push or stash your changes, they will get overwritten as normal.

So I get the bliss that is git, my team gets to use what they're familiar with; win-win!

No comments: