Skip to content

Instantly share code, notes, and snippets.

@koenongena
Created August 13, 2012 16:04
Show Gist options
  • Save koenongena/3342202 to your computer and use it in GitHub Desktop.
Save koenongena/3342202 to your computer and use it in GitHub Desktop.
git aliases
[alias]
current-branch =rev-parse --abbrev-ref HEAD
[alias]
rebase-onto-master = !CURRENT=$(git rev-parse --abbrev-ref HEAD) && git checkout master && git pull && git checkout $CURRENT && git rebase -i master
[alias]
merge-into-master = !CURRENT=$(git rev-parse --abbrev-ref HEAD) && git checkout master && git merge $CURRENT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment