Skip to content

Instantly share code, notes, and snippets.

@vathpela
Created July 23, 2015 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vathpela/0f88a9c654bd932971a5 to your computer and use it in GitHub Desktop.
Save vathpela/0f88a9c654bd932971a5 to your computer and use it in GitHub Desktop.
# 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/*
#!/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"
#!/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