3

I am new to git and github, so bear with me.

Here's the scenario:

  1. I forked a repo, created a branch named patch-3, made some changes, and submitted a pull request to the original owner.

  2. A week passes by, and I decide I want to "resync" my old fork, so I delete the old fork, and refork the original project so I can have the most up-to-date version.

  3. The old pull request is still open, and the original owner replies back saying he wants to merge my changes, but patch-3 has disappeared. He then asked me if I can "repush" it.

  4. I go back to my new fork, and create a new branch called patch-3 and reapply my initial changes. That's it.

My question is: will the old pull request now pick up the new patch-3 branch I created in the new fork, so the original owner can merge my changes? I did not see any indication of what I did in the old pull request page... so something seems to be off here.

Any help is appreciated! Thanks!

1 Answers1

2

No, you need to make a new pull request.

The right way, in order to get the most up-to-date version and still have your pull request, is:

  • to fetch upstream (the original repo)
  • rebase patch-3 on top of it
  • push it to your fork (named 'origin')

... and you will see the pull request automagically updated with the new SHA1 of your branch.

See "Git fork is git clone?" for the difference between the remote upstream and origin.

upstream and fork

The point is: don't delete/recreate repos: you can update and rebase.

See also "My pull request has been merged, what to do next?".

For more tips; see "How to do a Github pull request?".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250