Skip to content

Instantly share code, notes, and snippets.

@seamusjr
Last active August 29, 2015 14:15
Show Gist options
  • Save seamusjr/e2b81cef98576fc27806 to your computer and use it in GitHub Desktop.
Save seamusjr/e2b81cef98576fc27806 to your computer and use it in GitHub Desktop.
Git SVN cheatsheet
GIT SVN NOTES:
Merge:
-----------------------------
git checkout master
git svn rebase
git checkout MY_FEATURE
git rebase master
git checkout master
git merge MY_FEATURE
git svn dcommit
git checkout MY_FEATURE
git rebase master
Update:
-----------------------------
git checkout master
git svn rebase
git checkout MY_FEATURE
git rebase master
Clone Externals:
-------------------------------
First time set up git-svn-clone:
ruby git-svn-clone-externals.rb --no-history
GIT STASH
-------------------------------
do something in master
git stash
git checkout -b feature
git stash apply
First-time Checkout:
-------------------------------
mkdir SVNREPO;
cd SVNREPO;
git svn init http://SVNREPO/trunk
git svn clone http://SVNREPO/trunkq
# Tip: Instead of above, checkout into a dir with the name of the repo.:
# This combines the init and clone steps into one command:
$ git svn clone http://SVNREPO/PROJECTNAME PROJECTNAME
$ git add .
$ git commit -m "initial checkout"
$ git checkout -b MY_FEATURE
# proceed to Update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment