Reputation: 40492
How can a pull request on github be cancelled?
Upvotes: 225
Views: 293680
Reputation: 154
If you have opened PR on gitHub, but it is not merged yet and you want to get rid off it, not just close, do this simple command:
git push origin --delete <your branch name of your PR>
Upvotes: 8
Reputation: 149
I had the same problem. What I did is
That's all.
Upvotes: 4
Reputation: 3439
GitHub now supports closing a pull request
Basically, you need to do the following steps:
Example (button on the very bottom):
This way the pull request gets closed (and ignored), without merging it.
Upvotes: 225
Reputation: 2528
Original Repository
where the pull request has been submitted to.Pull requests
tabClose Pull Request
buttonUpvotes: 0
Reputation: 915
Go to conversation tab then come down there is one "close pull request" button is there use that button to close pull request, Take ref of attached image
Upvotes: 8
Reputation: 1323263
In the spirit of a DVCS (as in "Distributed"), you don't cancel something you have published:
Pull requests are essentially patches you have send (normally by email, here by GitHub webapp), and you wouldn't cancel an email either ;)
But since the GitHub Pull Request system also includes a discussion section, that would be there that you could voice your concern to the recipient of those changes, asking him/her to disregards 29 of your 30 commits.
Finally, remember:
That being said, since January 2011 ("Refreshed Pull Request Discussions"), and mentioned in the answer above, you can close a pull request in the comments.
Look for that "Comment and Close" button at the bottom of the discussion page:
Upvotes: 17
Reputation: 22041
If you sent a pull request on a repository where you don't have the rights to close it, you can delete the branch from where the pull request originated. That will cancel the pull request.
Upvotes: 10