首页 > 解决方案 > git fetch upstream master 不工作,怎么回事?

问题描述

在此处输入图像描述

所以我想知道上游master是否有问题?我不确定当所有内容都已更新或是否有所不同时是否会发生此错误。

我已经毫无问题地添加了上游链接,使用 $ git remote add upstream https://github.com/udacity/course-collboration-travel-plans.git

现在只想和主人同步

标签: bashgitgithubversion-controlgit-bash

解决方案


当然,您的存储库 URL:https ://github.com/udacity/course-collboration-travel-plans.git给出了 404。您添加的远程没有存储库。

特别是我在您的远程 URL collboration==>中看到了一个错字collaboration。因此,应该作为远程添加的正确 URL 是: https ://github.com/udacity/course-collaboration-travel-plans.git

# Remove previously incorrect remote
$ git remote rm upstream
# Adding correct remote
$ git remote add upstream https://github.com/udacity/course-collaboration-travel-plans.git

希望能帮助到你。


推荐阅读