git中 报错 fatal: not a git repository (or any of the parent directories): .git

原因:在打开文件的子目录层级中不包含.git文件。
解决办法:

  1. 文件层级有误,嵌套包含子文件夹。需要找到包含.git文件的上一级目录才能进行操作。
  2. 可以在git init 后尝试重新操作。

猜你喜欢

转载自blog.csdn.net/weixin_40599109/article/details/108449122
今日推荐