Skip to content

Instantly share code, notes, and snippets.

@latortuga
Created October 26, 2010 23:07
Show Gist options
  • Save latortuga/648054 to your computer and use it in GitHub Desktop.
Save latortuga/648054 to your computer and use it in GitHub Desktop.
Git-svn tricks

Some of this is pulled directly from the git-svn man page.

Push a local git-branch to a new remote new-svn-branch

git svn branch new-svn-branch

now there is a new remote tracking branch, confirm with git branch -r to push local git-branch changes to the new svn branch git checkout git-branch git rebase --onto new-svn-branch OR from master (this seems to work better) git rebase --onto new-svn-branch master git-branch

Clone an svn repo to a git repo

git svn clone http://svn.example.com/project folder_name -T trunk -b branches -t tags
  • pass -s instead of T/b/t for standard layout
  • pass . for current dir
  • could take a long time on a large repo

View all cloned branches and tags

git branch -r

Git SVN config

  • fetch config does not support glob params, only use for trunk
  • branches supports glob params, use for tags and branches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment