Skip to content

Instantly share code, notes, and snippets.

@sammyd
Created May 2, 2012 11:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sammyd/2575989 to your computer and use it in GitHub Desktop.
Save sammyd/2575989 to your computer and use it in GitHub Desktop.
Push existing git repo to SVN
You can now sync from svn -> git, using the following commands:
git svn fetch
git rebase trunk
And to sync from git -> svn, use:
git svn dcommit
Based on http://stackoverflow.com/questions/661018/pushing-an-existing-git-repository-to-svn
1. cd /path/to/git/localrepo
2. svn mkdir --parents protocol:///path/to/repo/PROJECT/trunk -m "Importing git repo"
3. git svn init protocol:///path/to/repo/PROJECT -s
4. git svn fetch
5. git rebase trunk
5.1. git status
5.2. git add (conflicted-files)
5.3. git rebase --continue
5.4. (repeat 5.1.)
6. git svn dcommit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment