Michael Parker
Michael Parker

Reputation: 8380

GitHub: Reopening a merged pull request

I've now fixed the bug and want to resubmit the pull request with 1 extra commit. Is there any way to reopen the pull request or update it, or do I have to create a new pull request, type out the description etc again? Gitorious has this feature and we've recently moved to GitHub.

Upvotes: 191

Views: 174053

Answers (9)

Darkrai
Darkrai

Reputation: 1

Its 2023 now, you can reopen a pull request with just a click in the bottom left. Further, you can edit the comment as you wish. Thank you!

Upvotes: -2

george
george

Reputation: 1

A PR that has been shut down will now reopen a button:

enter image description here

Upvotes: -1

Dato
Dato

Reputation: 454

Edited by the author to add: It's 2023, and consensus seems to be this never works.


Well, it's 2021 and—almost a decade later—to my dismay, stupor, and joy, a simple gh pr reopen N¹ did reopen my PR—in a situation which I know was un-reopenable through UI before (or so I believe). ¯\_(ツ)_/¯

May this work for you too!

(¹) gh being GitHub’s official command line tool.

Upvotes: 4

Matthew Husák
Matthew Husák

Reputation: 453

I've tried all of the tricks & tips. Simply - you can't re-open it.

It is what it is. (even that I'm sad they haven't come up with this)

Upvotes: 4

Vlada
Vlada

Reputation: 258

You could just revert a reverted PR, this should have all the changes that was reverted from original PR.

Upvotes: 3

Michael Parker
Michael Parker

Reputation: 8380

The answer seems to be: You can't.

Once a pull request is merged and closed, it is locked forever and cannot be reopened. If your pull request is merged, closed, then your changes are pulled out (via force pushing backwards to before the merge), you will need to add commits to the branch and create a new pull request, copying all the details over and probably providing a link to the original pull request to manually save the history.

Might be a nice feature request for future GitHub.

Upvotes: 186

William Weckl
William Weckl

Reputation: 2465

You can use the revert action:

enter image description here

It will create another pull request undoing all the changes did in the merged PR.

Upvotes: 4

Siva Gollapalli
Siva Gollapalli

Reputation: 646

Just derive a new branch from the existing branch where you have done extra 1 commit. From there submit the pull request.

Upvotes: 3

Tim Lovell-Smith
Tim Lovell-Smith

Reputation: 16125

I just successfully reopened a pull request by

  1. Commenting on the pull request
  2. Clicking the 'Submit and re-open' button which appeared on the comment form.

Upvotes: 11

Related Questions