Skip to content

Instantly share code, notes, and snippets.

@peacefixation
Last active December 22, 2020 03:42
Show Gist options
  • Save peacefixation/74342e9a8fc492835277d29ffec4ca23 to your computer and use it in GitHub Desktop.
Save peacefixation/74342e9a8fc492835277d29ffec4ca23 to your computer and use it in GitHub Desktop.
Github checkout pull request
# someone has forked my repo and created a pull request
# I want to review and test the code locally before I merge the pull request
# the pull request URL on Github (#4 in this case)
https://github.com/user/project/pull/4
# fetch the pull request (#4) and create a local branch called 'pr-4'
git fetch origin pull/4/head:pr-4
# checkout the local branch
git checkout pr-4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment