尝试从原始存储库更新本地分叉存储库时,获取“无法从远程存储库读取”

问题描述 投票:0回答:1

我根据此处的说明创建了存储库的分支-https://guides.github.com/activities/forking/。然后,将其克隆到本地计算机。我想用原始存储库的master分支中的文件更新本地存储库,但似乎无法弄清楚。我尝试过

localhost:resilience-app davea$ git remote add upstream https://github.com/factn/resilience-app
localhost:resilience-app davea$ git pull upstream/master
fatal: 'upstream/master' does not appear to be a git repository
fatal: Could not read from remote repository.

请确保您具有正确的访问权限

用原始存储库中的最新文件更新本地存储库的正确语法是什么?

git github fork git-remote
1个回答
0
投票

如果要同时指定远程存储库和分支的名称,请用空格而不是斜杠将它们分开:git pull upstream master。但是master通常是默认分支,因此您可以尝试git pull upstream

© www.soinside.com 2019 - 2024. All rights reserved.