Created
May 2, 2012 11:38
-
-
Save sammyd/2575989 to your computer and use it in GitHub Desktop.
Push existing git repo to SVN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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