Last active
October 11, 2015 05:28
-
-
Save wanderr/3810077 to your computer and use it in GitHub Desktop.
~/.gitconfig alias for reviewing/merging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
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
example use:
git checkout {targetBranch}
git review {nameOfRemote} {nameOfBranch}
...look at the diff...
git approve
git push