- 原文地址: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