Last active
August 29, 2015 14:11
-
-
Save shrop/85eb7f6d454c819879c0 to your computer and use it in GitHub Desktop.
Git Alias Setup for Checking Out Pull Requests from Stash and Github
This file contains hidden or 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] | |
| # Checkout Stash pull requests. | |
| spr = !sh -c \"git fetch origin pull-requests/${1}/from:pr/${1}/from && git fetch origin pull-requests/${1}/merge:pr/${1}/merge && git checkout pr/${1}/from\" - | |
| # Checkout Github pull requests. | |
| gpr = !sh -c \"git fetch origin pull/${1}/head:pr/${1} && git checkout pr/${1}\" - |
This file contains hidden or 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 spr <pr-number> | |
| $ git gpr <pr-number> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment