Skip to content

Instantly share code, notes, and snippets.

@wanderr
Last active October 11, 2015 05:28
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 wanderr/3810077 to your computer and use it in GitHub Desktop.
Save wanderr/3810077 to your computer and use it in GitHub Desktop.
~/.gitconfig alias for reviewing/merging
[alias]
review = !sh -c 'REF=`git rev-parse --symbolic-full-name --abbrev-ref HEAD` && git fetch $1 $2:mergeReview -f && git checkout mergeReview && git rebase $REF && git checkout $REF && git diff HEAD..mergeReview' -
approve = merge mergeReview
pr = !git review origin refs/pull/$1/head
@wanderr
Copy link
Author

wanderr commented Oct 1, 2012

example use:
git checkout {targetBranch}
git review {nameOfRemote} {nameOfBranch}
...look at the diff...
git approve
git push

@wanderr
Copy link
Author

wanderr commented Apr 11, 2013

example use for pr:
git checkout {targetBranch}
git pr {pull request #}
...look at the diff...
git approve
git push

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment