- 原文地址:Sync an out of date branch of a fork from the web
- 原文作者:The GitHub Blog
- 译文出自:掘金翻译计划
- 本文永久链接:juejin.cn/post/696331…
- 译者:霜羽 Hoarfroster
- 校对者:霜羽 Hoarfroster
不知道您是否遇到过
- fork 分支的主分支过气了(x)
- 想要同步分支
- GitHub 上只支持 Merge
- Merge 会导致不必要的 Commit 记录
这下子估摸着也只能使用 git
命令行处理了……不过现在,时代变了!
您现在可以在 Web 端同步一个过期的 Fork 分支与其上游分支(upstream
)。如果分支之间没有合并冲突,则 Fork 的分支可以通过快速转发(fast-forwarding
)或通过从上游分支合并(Merging
)来更新。如果存在冲突,系统将提示您打开一个拉取请求。
下图为同步一个 Fork 分支(其上游迄今为止没有冲突的分支):
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
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END