【问题标题】:How to synchronize a GitHub fork?如何同步 GitHub 分叉?
【发布时间】:2024-01-02 16:40:01
【问题描述】:

我正在尝试按照here 找到的说明进行操作,但在第一步就失败了:

C:\wxFork [master +42 ~0 -32 !]> git fetch upstream
fatal: 'upstream' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我该怎么办?

谢谢。

【问题讨论】:

标签: github synchronize git-fork


【解决方案1】:

您需要先将您的upstream 添加到您的remotes 列表中:

git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git

执行git remote -v 应该显示您的upstream,现在git fetch upstream 应该适合您

【讨论】: