Created
July 23, 2015 15:15
-
-
Save vathpela/0f88a9c654bd932971a5 to your computer and use it in GitHub Desktop.
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
# this works in repo/.git/config as well as just putting it in ~/.gitconfig | |
# and having it work in all repos. Note that it basically never gets cleaned | |
# up, though, so if you're working on a big tree with lots of pull requests, | |
# you may need to /delete/ them | |
[remote "origin"] | |
fetch = +refs/pull/*/head:refs/pull/origin/* | |
[remote "upstream"] | |
fetch = +refs/pull/*/head:refs/pull/upstream/* |
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/bash | |
set -e | |
usage() { | |
echo "git show-pull <remote> <pull_number>" | |
exit $0 | |
} | |
for x in "$@" ; do | |
case "$x" in | |
--help|-h|--usage|-\?) | |
usage 0 | |
;; | |
esac | |
done | |
if [ $# -ne 2 ]; then | |
usage 1 1>&2 | |
fi | |
exec git cherry-pick "..refs/pull/$1/$2" |
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/bash | |
set -e | |
usage() { | |
echo "git show-pull <remote> <pull_number>" | |
exit $0 | |
} | |
for x in "$@" ; do | |
case "$x" in | |
--help|-h|--usage|-\?) | |
usage 0 | |
;; | |
esac | |
done | |
if [ $# -ne 2 ]; then | |
usage 1 1>&2 | |
fi | |
exec git log --color --abbrev=7 --oneline --abbrev-commit "..refs/pull/$1/$2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment