开发者

How to cancel a pull request on github?

How can a pull request on开发者_开发问答 github be cancelled?


GitHub now supports closing a pull request

Basically, you need to do the following steps:

  1. Visit the pull request page
  2. Click on the pull request
  3. Click the "close pull request" button

Example (button on the very bottom):

How to cancel a pull request on github?

This way the pull request gets closed (and ignored), without merging it.


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:

  • a/ you have a preview section when making a pull request, allowing you to see the number of commits about to be included in it, and to review their diff.
  • b/ it is preferable to rebase the work you want to publish as pull request on top of the remote branch which will receive said work. Then you can make a pull request which could be safely applied in a fast forward manner by the recipient.

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:

How to cancel a pull request on github?


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.


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

How to cancel a pull request on github?


I had the same problem. What I did is

  1. Go to the Pull Request page.
  2. Check the commit using the checkmark on left of the commit.
  3. From the dropdown "Mark as" click Close.

That's all.


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>


Super EASY way to close a Pull Request - LATEST!

  1. Navigate to the Original Repository where the pull request has been submitted to.
  2. Select the Pull requests tab
  3. Select your pull request that you wish to remove. This will open it up.
  4. Towards the bottom, just enter a valid comment for closure and press Close Pull Request button

How to cancel a pull request on github?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜