How to cancel a pull request on github?

家住魔仙堡 提交于 2019-11-28 16:54:48

问题


How can a pull request on github be cancelled?

UPDATE The accepted answer didn't detail the steps in the answer and in any case, github has made this dead simple since this question was asked, so here are the steps:

  1. Visit the pull request page
  2. Tap the "close pull request button"

回答1:


GitHub now supports closing a pull request




回答2:


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:




回答3:


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.




回答4:


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




回答5:


I wanted to comment, but since my reputation won't qualify for commenting, it had to be an answer. Github will actually let you not only cancel a pull request, but also delete it by simply deleting the fork you are trying to push. Hope this may help some others googling this.



来源:https://stackoverflow.com/questions/5385567/how-to-cancel-a-pull-request-on-github

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!