需要从拉力请求中删除多个提交

发布于 2025-01-24 07:52:33 字数 110 浏览 3 评论 0原文

我不小心创建了Git Branch B,然后在分支A上。然后,我创建了一个拉动请求,我看到了分支A的所有提议都在B分支上转移。我需要从B Branch \ Pult请求中删除所有A提交,而无需关闭拉请请求。

I accidentally created git branch B, while being on branch A. Then i created a pull request, where i saw, that all the commits from branch A were transfered on B branch. I need to delete all A commits from B branch \ pull request without closing a pull request.

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

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

发布评论

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

评论(1

风和你 2025-01-31 07:52:33

只需将b重新置于正确的起点(即,而不是a),然后再次将其推动(如有必要,请使用- force)。

第一步是git rebase -onto xa b(其中x是任何起点b 应该 ),与

第二步只是重复您已经使用过的任何git push

Just rebase B onto the correct starting point (ie, not A), and then push it again (with --force if necessary).

The first step is a git rebase --onto X A B (where X is whatever starting point B should have), exactly as covered in the manual.

The second step is just repeating whatever git push you already used.

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