Skip to content

Instantly share code, notes, and snippets.

@nebiros
Created August 11, 2011 13:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nebiros/1139649 to your computer and use it in GitHub Desktop.
Save nebiros/1139649 to your computer and use it in GitHub Desktop.
My git svn workflow
# clone svn repo, -s means standar svn repo (trunk, branches, tags)
$ git svn clone file:///tmp/test-svn -s
# branches list
$ git branch -a
$ git repack -d
# creates and jump to the new branch
$ git checkout -b new_branch
# add changes
$ git add <FILE>
# commit changes to the current branch
$ git commit -a
# jump to the master
$ git checkout master
# merge changes from our new branch, a rebase is needed to make
# the repo history linear, check this out: http://progit.org/book/ch3-6.html
$ git rebase new_branch
# update trunk from svn
$ git svn rebase
# commit changes to svn
$ git svn dcommit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment