Last active
March 16, 2017 16:55
-
-
Save captainsafia/954351fc7b05bb748b5d2112624f8a2f to your computer and use it in GitHub Desktop.
A fish function that allows you to quickly checkout a branch for a pull request on a repo
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
| function gh-pull | |
| git fetch $argv[1] pull/$argv[2]/head:pr-$argv[2] | |
| git checkout pr-$argv[2] | |
| end |
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
| captainsafia@eniac ~/p/goops> gh-pull origin 2 | |
| remote: Counting objects: 11, done. | |
| remote: Compressing objects: 100% (3/3), done. | |
| remote: Total 11 (delta 6), reused 11 (delta 6), pack-reused 0 | |
| Unpacking objects: 100% (11/11), done. | |
| From https://github.com/captainsafia/goops | |
| * [new ref] refs/pull/2/head -> pr-2 | |
| Switched to branch 'pr-2' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment