-
-
Save smgoller/1171102 to your computer and use it in GitHub Desktop.
git svn workflow
This file contains hidden or 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
# adapted from http://notes.jimlindley.com/2008/3/25/git-svn-that-works-for-me | |
# initial setup | |
git svn clone <svn_repo> | |
# begin the workflow | |
git svn fetch -r HEAD --ignore-paths="Package.zip" # aliased to 'git up', my Package.zip is very large. | |
git svn rebase -l # we just updated, no need to go back to the svn repo | |
# 99% of daily workflow | |
git checkout -b <work_branch> | |
# ----- hack loop | |
git add . | |
git commit -a -m <message> | |
# ---- hack loop end | |
# ----- update master loop | |
git checkout master | |
git up | |
git svn rebase -l | |
# now that master is current with svn, | |
# sync working branch to local master | |
git checkout <work_branch> | |
git rebase master # conflicts here: git mergetool -t tortoisemerge | |
# ----- update master loop end | |
# final upstream commit after rebasing | |
git checkout master | |
git up | |
git svn rebase -l # one last check for new svn check ins | |
git merge --squash <work_branch> | |
git svn dcommit -e # -e allows us to enter an svn commit message | |
git repack -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment