Created
May 2, 2014 16:03
-
-
Save aectann/5561b035aeea0d9d7049 to your computer and use it in GitHub Desktop.
Bash alias to sync git repo with SVN repo. Based on this guide -- http://ben.lobaugh.net/blog/147853/creating-a-two-way-sync-between-a-github-repository-and-subversion
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
#Append following to .bashrc | |
#To sync run git-sync | |
alias git-sync='git checkout master&&git pull origin master&&git checkout svnsync&&git svn rebase&&git merge --no-ff master -m "Auto-merge on svn sync"&&git svn dcommit&&git checkout master' |
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
git branch --no-track svnsync | |
git svn init -s http://your.svn.address.here | |
git svn fetch | |
git reset --hard remotes/trunk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment