当使用 git 出现错误 fatal: 'upstream' does not appear to be a git repository 时怎么办?
背景介绍:
在使用 git 工具时,遇到如下错误。
报错内容:
$ git fetch upstream
fatal: 'upstream' does not appear to be a git repository
fatal: Could not read from remote repository.
解决办法:
执行如下命令添加 openGauss 社区 blog 仓为 upstream。
git remote add upstream https://gitee.com/opengauss/blog.git执行如下命令查看是否 origin 和远程 upstream 都已添加。
$ git remote -v origin https://gitee.com/zcp100_zcp100/blog.git (fetch) origin https://gitee.com/zcp100_zcp100/blog.git (push) upstream https://gitee.com/opengauss/blog.git (fetch) upstream https://gitee.com/opengauss/blog.git (push)如果显示以上结果 ,表明都已添加。可执行 commit 提交文档。
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




