如何取消 github 上的拉取请求?

发布于 2024-10-25 05:24:46 字数 30 浏览 0 评论 0原文

如何取消 github 上的 Pull 请求?

How can a pull request on github be cancelled?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

你好,陌生人 2024-11-01 05:24:56

关闭 Pull 请求的超级简单方法 - 最新!

  1. 导航到拉取请求已提交到的原始存储库
  2. 选择拉取请求选项卡
  3. 选择您要删除的拉取请求。这将打开它。
  4. 在底部,只需输入有效的注释来关闭,然后按关闭拉取请求按钮

在此处输入图像描述

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

enter image description here

恋你朝朝暮暮 2024-11-01 05:24:56

只需删除您为拉取请求创建的分支

just delete the branch you have crteated for pull request

落叶缤纷 2024-11-01 05:24:55

我也有同样的问题。我所做的是

  1. 转到 Pull Request 页面。
  2. 使用提交左侧的复选标记检查提交。
  3. 从“标记为”下拉列表中单击“关闭”。

就这样。

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.

-柠檬树下少年和吉他 2024-11-01 05:24:54

如果您已在 gitHub 上打开 PR,但尚未合并,并且您想摆脱它,而不仅仅是关闭,请执行以下简单命令:

git push origin --delete <your branch name of your PR>

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>
夜巴黎 2024-11-01 05:24:52

转到“对话”选项卡,然后下来,有一个“关闭拉取请求”按钮,可以使用该按钮关闭拉取请求,请参考附图

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

允世 2024-11-01 05:24:51

本着 DVCS 的精神(如“分布式”),您不会取消已发布的内容:
拉取请求本质上是您发送的补丁(通常通过电子邮件,这里是 GitHub webapp),并且您也不会取消电子邮件;)

但是由于 GitHub 拉取请求系统还包括一个讨论部分,因此您可以在那里向这些更改的接收者表达您的担忧,要求他/她忽略您 30 项提交中的 29 项。

最后,请记住:

  • a/在发出拉取请求时,您有一个预览部分,允许您查看其中包含的提交数量,并查看它们的差异。
  • b/ 最好将您想要作为拉取请求发布的工作变基到将接收所述工作的远程分支之上。然后,您可以发出拉取请求,接收者可以以快进的方式安全地应用该拉取请求。

话虽这么说,自 2011 年 1 月以来(“刷新 Pull 请求讨论” ),并在上面的答案中提到,您可以在评论中关闭拉取请求。
在讨论页面底部查找“评论并关闭”按钮:

https://github-images.s3.amazonaws .com/blog/2011/pull-refresh.png

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:

https://github-images.s3.amazonaws.com/blog/2011/pull-refresh.png

情深如许 2024-11-01 05:24:51

如果您在无权关闭的存储库上发送了拉取请求,则可以从拉取请求发起的位置删除分支。这将取消拉取请求。

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.

〃温暖了心ぐ 2024-11-01 05:24:50

GitHub 现在支持 关闭拉取请求

基本上,您需要执行以下操作步骤:

  1. 访问拉取请求页面
  2. 单击拉取请求
  3. 单击“关闭拉取请求”按钮

示例(最底部的按钮):

github close pull request

这样拉取请求就会被关闭(并被忽略),而不需要合并它。

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):

github close pull request

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文