Skip to content

Instantly share code, notes, and snippets.

@samkeen
Last active April 17, 2019 07:33
Show Gist options
  • Save samkeen/5296873 to your computer and use it in GitHub Desktop.
Save samkeen/5296873 to your computer and use it in GitHub Desktop.
git svn workflow

Clone

# -s is there to signify that my Subversion repository has a standard layout (trunk/, branches/, and tags/)
$ git-svn clone -s http://example.com/my_subversion_repo local_dir

Gitignore

# check in strategy
$ git svn show-ignore > .gitignore
# just local strategy
$ git svn show-ignore >> .git/info/exclude

commit branch to 'origin'/trunk (via rebase strategy)

# This will download all new changesets from Subversion, apply them 
# to the last checkout from Subversion, and then re-apply your local 
# changes on top of that.
$ git svn rebase
$ git co <your banch>
$ git rebase master
$ git co master
$ git merge <your branch>
$ git svn rebase
$ git svn dcommit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment