Last active
August 13, 2020 08:53
-
-
Save shorti1996/59ba6b1a749da01469382681cc39f1d8 to your computer and use it in GitHub Desktop.
Git review alias
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
git config alias.review "\!f() { prnumber=\$1; repo=\$2; [ -z \${repo} ] && repo=base; | |
git fetch \${repo} pull-requests/\${prnumber}/from && git checkout FETCH_HEAD; }; f" |
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
git config alias.review "!f() { prnumber=$1; repo=$2; [ -z ${repo} ] && repo=base; git | |
fetch ${repo} pull-requests/${prnumber}/from && git checkout FETCH_HEAD; }; f" |
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
git config alias.review "\!f() { prnumber=\$1; repo=\${2:-origin}; | |
git fetch \${repo} merge-requests/\${prnumber}/head && git checkout FETCH_HEAD; }; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment