git 如何取消 github 上的拉取请求?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5385567/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to cancel a pull request on github?
提问by memmons
How can a pull request on github be cancelled?
如何取消 github 上的拉取请求?
UPDATEThe 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:
更新接受的答案没有详细说明答案中的步骤,无论如何,自从提出这个问题以来,github 已经使这变得非常简单,所以这里是步骤:
- Visit the pull request page
- Tap the "close pull request button"
- 访问拉取请求页面
- 点击“关闭拉取请求按钮”
采纳答案by you cad sir - take that
GitHub now supports closing a pull request
GitHub 现在支持关闭拉取请求
回答by VonC
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 ;)
本着 DVCS 的精神(如“分布式”),您不会取消已发布的内容:
拉取请求本质上是您发送的补丁(通常通过电子邮件,此处通过 GitHub webapp),并且您不会取消电子邮件 ;)
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.
但是由于 GitHub Pull Request 系统还包括一个讨论部分,因此您可以在那里向这些更改的接收者表达您的担忧,要求他/她忽略您 30 次提交中的 29 次。
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.
- a/ 在提出拉取请求时,您有一个预览部分,允许您查看将要包含在其中的提交数量,并查看它们的差异。
- b/ 最好将要发布的工作作为拉取请求发布在将接收所述工作的远程分支之上。然后,您可以发出一个拉取请求,接收者可以以快进的方式安全地应用该请求。
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:
话虽如此,自 2011 年 1 月(“刷新的拉取请求讨论”)起,并在上面的答案中提到,您可以在评论中关闭拉取请求。
在讨论页面底部寻找“评论并关闭”按钮:
回答by Roch
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.
如果您在无权关闭它的仓库上发送了拉取请求,您可以删除拉取请求所在的分支。这将取消拉取请求。
回答by Mohit
回答by Arkadij
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 onlycancel a pull request, but also delete itby simply deleting the fork you are trying to push. Hope this may help some others googling this.
我想发表评论,但由于我的声誉没有资格发表评论,所以它必须是一个答案。Github上实际上将让你不仅取消拉的要求,同时也删除它通过简单地删除您试图推叉。希望这可以帮助其他一些人在谷歌上搜索这个。