gpt4 book ai didi

github - 保持 fork 最新

转载 作者:行者123 更新时间:2023-12-04 00:54:07 31 4
gpt4 key购买 nike

我想将某些东西提交到 github 存储库,但我(显然)没有任何权利这样做。我对那个 repo 做了一个分支,提交了我的更改并提交了一个 pull-request。
现在,问题是过了一段时间其他人已经对原始 repo 进行了提交,这意味着我的 fork 不再是最新的。

现在应该如何更新我的 fork ?这( https://stackoverflow.com/a/23853061/5513628 )仍然是一种有效的方式,还是我必须删除我的仓库并每次都创建一个新的 fork ?

这是 github 桌面中 fork 的样子:

enter image description here

拉取请求是我提出的,但之后的两次提交是由其他人提出的。它们不包含在我的 repo 中...

最佳答案

To sync changes you make in a fork with the original repository, you must configure a remote that points to the upstream repository in Git.


不再是,自 2021 年 5 月以来:

Sync an out of date branch of a fork from the web


You can now use the web UI to synchronize an out of date branch of a fork with its upstream branch. If there are no merge conflicts between the branches, the fork's branch is updated either by fast-forwarding or by merging from the upstream's branch. If there are conflicts, you will be prompted to open a pull request to resolve.

Fetch upstream up to date, no conflict, and conflict flows

From GitHub:

Go to your fork, click on Fetch upstream and then click on Fetch and merge to directly sync your fork with its parent repo.

Compare and sync

You may also click on the Compare button to compare the changes before merging.

关于github - 保持 fork 最新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39819441/

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