gpt4 book ai didi

git - 在 Github 上更改 PR 的源代码分支

转载 作者:IT王子 更新时间:2023-10-29 01:04:54 32 4
gpt4 key购买 nike

我不小心从我的 repo 分支的主分支创建了一个 pull 请求。

在尝试对其进行 rebase 时,我注意到所有这些更改都被推送到该 pull 请求中——因为您可以简单地通过推送到用户名/repo 上的 master 分支来添加更多提交

  • 您能否在提交 pull 请求后更改 pull 请求的源分支?

我看到您可以编辑基本分支,但这显然不是我想要的。

最佳答案

据我所知,您不能在创建 merge 请求后更改源分支。您必须创建一个新的。

为了将来引用,既定的最佳做法是在进行任何提交之前创建一个新分支。您不应该直接提交给 master,尤其是在为团队项目做贡献时。

旁注:

you can simply Add more commits by pushing to the master branch on username/repo

更准确地说,对 PR 目标分支的任何更改都会自动包含在 PR 中。

关于git - 在 Github 上更改 PR 的源代码分支,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42381557/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com