🌫github 下 fork 后如何同步源的新更新内容?

date
Apr 10, 2021
slug
github-fork-update
status
Published
tags
IT
summary
github 同步
type
Post
URL
首发时间
Apr 10, 2021 02:56 PM
Files
日期
在 github 网页上点几下(pull request 功能)即可达到的你的目的。
举个栗子:
a 开发者:JiaoXianjun/openwifi
b 开发者:open-sdr/openwifi
a 开发者(你)想要同步 b 开发者的最新更新。
1。a 开发者打开自己的页面:(注意看鼠标停在 pull request 那了)
notion image
2。a 开发者点击 Pull request。此时默认的同步方向是把 a(你)的工作同步给 b,这不是你想要的功能。
notion image
别急,往下看。
3。 鼠标点击右边,选择为 b 的仓库。
notion image
4。此时得到下图,两边都是 b 的,这仍旧不是你想要的。好在快了,看我鼠标停在了 compare across forks。
notion image
5。点击 compare across forks,然后我们就接近了。此时,左边右边都会变成 b 的
notion image
6。将左边选为 a(你)的
notion image
7。此时如果 github 对比了 b 和 a 的,认为 b 比 a 有更新,则会出现下面的页面。看我鼠标停在哪。
notion image
8。点击 Create pull request,出现下面页面。这就是把 b 同步给 a 的 pull request。再次看我鼠标停在哪。
notion image
9。继续点击 Create pull request。这是生成一个面向 a 的 pull request。a(你)只需要批准。看我鼠标停在哪。
notion image
10。a(你)点击 Merge pull request,然后 Confirm merge
notion image
11。b 同步给 a 的目标达成!
notion image

© Wanx 2021 - 2025