Skip to content

Instantly share code, notes, and snippets.

@nstjhp
Last active May 18, 2021 12:08
Show Gist options
  • Save nstjhp/ff86b99f660d377202cd50fb3103b7ac to your computer and use it in GitHub Desktop.
Save nstjhp/ff86b99f660d377202cd50fb3103b7ac to your computer and use it in GitHub Desktop.
Review a pull request before merging
git fetch origin pull/NN/head:prNN ## check the PR number - this is what goes between pull and head. After the : is the name of the branch - makes sense to call it like this prID where ID is PR number
git checkout prNN ## After checking out you can compile, edit, do whatever to the PR branch
git checkout main ## If you're happy switch back to main branch before merging
git merge --no-ff prNN
git status
git log
git push origin main ## push to Github
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment