Skip to content

Instantly share code, notes, and snippets.

@aectann
Created May 2, 2014 16:03
Show Gist options
  • Save aectann/5561b035aeea0d9d7049 to your computer and use it in GitHub Desktop.
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
#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'
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