Using SVN with Git

Once I learned Git I never wanted to go back to the days of svn. The only problem is that SVN is used almost in every linux shop I worked for. Luckily there is git-svn. With git-svn I can just import an svn repositories and use git to browse, branch, merge etc.

My typical workflow:

1) Import the repository into git.

2) Get a branch to hack on

3) Keep up with svn commits:

This fetches revisions from the SVN parent of the current HEAD and rebases the current (uncommitted to SVN) work against it.

This works similarly to svn update or git pull except that it preserves linear history with git rebase instead of git merge for ease of dcommitting with git svn.

This accepts all options that git svn fetch and git rebase accept. However, –fetch-all only fetches from the current [svn-remote], and not all [svn-remote] definitions.

Like git rebase; this requires that the working tree be clean and have no uncommitted changes.

4) Commit changes back to svn