Skip to content

Instantly share code, notes, and snippets.

@rhysd
Created January 31, 2018 10:30
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 rhysd/e4550a7a441eb76b4e514adcc4e34ead to your computer and use it in GitHub Desktop.
Save rhysd/e4550a7a441eb76b4e514adcc4e34ead to your computer and use it in GitHub Desktop.
#! /bin/bash
set -e
if [[ "$1" == "" ]]; then
echo "Usage: git pull-pr {PR number}" 1>&2
exit 1
fi
git fetch origin "pull/$1/head:pr-$1"
git checkout "pr-$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment