Skip to content

Instantly share code, notes, and snippets.

@joeldart
Created December 15, 2011 22:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joeldart/1483316 to your computer and use it in GitHub Desktop.
Save joeldart/1483316 to your computer and use it in GitHub Desktop.
git alias to merge from origin into my feature branch
#obviously could inline, but it's more clear to me written out
git config alias.currbranch 'name-rev --name-only HEAD'
git config alias.updateandthen '!git checkout master && git fetch && git merge origin/master && git checkout'
git config alias.update '!curr=$(git currbranch) && git updateandthen $curr && git merge master || git mergetool'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment