【问题标题】:How to push a project to github after renamed a folder locally本地重命名文件夹后如何将项目推送到github
【发布时间】:2017-12-08 13:14:29
【问题描述】:

我正在学习 Git。我在本地重命名了一个文件夹,现在无法将项目推送到 GitHub。当我推送它时它会显示此消息。

push -u origin master
fatal: 'origin' 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.

感谢您的帮助。

【问题讨论】:

  • 你是如何重命名文件夹的?你是用git mv 还是简单的mv 命令
  • 这听起来像是你的配置搞砸了,而不是重命名文件夹是罪魁祸首。
  • @BasileStarynkevitch 不管怎样我都不会想到这个错误。
  • @BasileStarynkevitch 我没有使用终端。我手动重命名了它。
  • 你应该用过git mv

标签: git github git-push


【解决方案1】:

它的git push -u origin master
从理论上讲,git 与文件夹名称无关。它跟踪整个内容。

【讨论】:

  • 我不得不跑git pull,我可以跑git push
猜你喜欢
  • 1970-01-01
  • 2021-05-21
  • 2017-07-02
  • 1970-01-01
  • 2021-12-22
  • 1970-01-01
  • 2015-10-09
  • 2013-08-19
  • 1970-01-01
相关资源
最近更新 更多