Skip to content

Instantly share code, notes, and snippets.

@mhoyer
Created May 19, 2011 13:12
Show Gist options
  • Save mhoyer/980718 to your computer and use it in GitHub Desktop.
Save mhoyer/980718 to your computer and use it in GitHub Desktop.
git-svn workflow
# Initial checkout
mkdir foo-project
cd foo-project
git svn init http://<path-to-svn>/trunk .
git config --get-regexp 'svn-remote.*'
git svn fetch # fetch all revisions from remote svn to local git
git svn rebase
# some helping aliases
alias gdif='git diff'
alias gc='git commit'
alias gs='git status'
alias gpull='git svn fetch && git stash && git svn rebase && git stash apply'
alias gpush='git stash && git svn dcommit && git stash apply'
alias ga='git add -p'
# Daily Workflow
touch foo
ga foo
gc
echo "foo" >> foo
ga foo
touch bar
ga bar
gc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment