Skip to content

Instantly share code, notes, and snippets.

@amitsin6h
Last active June 6, 2019 04:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amitsin6h/79f101fc265155ff4b0b35e6f7fb0f60 to your computer and use it in GitHub Desktop.
Save amitsin6h/79f101fc265155ff4b0b35e6f7fb0f60 to your computer and use it in GitHub Desktop.
How to checkout pull request locally and modify & resend, to master

$ git fetch origin

*From github.com:username/repo*

* [new ref] refs/pull/1000/head -> origin/pr/1000

* [new ref] refs/pull/999/head -> origin/pr/999

To check out a particular pull request:

$ git checkout pr/999

Branch pr/999 set up to track remote branch pr/999 from origin.

Switched to a new branch 'pr/999'

Now modify the files from the pull request, then

$ git commit

$ git push -u origin branch

If the above does not work then,

$ git checkout -b newbranch from => 'pr/999'

$ git commit --allow-empty -m "your commit message"

$ git push -u origin newbranch

In this way you can modify someone else pr and send pr to master branch again with the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment