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
#!/bin/sh | |
# Usage: `git checkout-pr <pull-request-id>` | |
# | |
# Make this file executable and place in a $PATH directory | |
# The name of the file is important. It has to be named `git-checkout-pr` for the usage to be `git checkout-pr` | |
# Every pull request on stash has 2 branches. One is called `merge` which is a branch that is merged with its destination. | |
# The other is `from` which is the unmodified revision that was pushed. This script checks out the merge branch. | |
# If you want to checkout the pr that is not pre-merged with it's destination, change all occurances of `merge` to `from` |