我用git add file添加文件时出现了这样错误:

fatal: Not a git repository (or any of the parent directories): .git

提示说没有.git这样一个目录,解决办法如下:

git init就可以了!

也就是说,在命令行敲入git init回车之后,再重新执行添加文件的命令即可。

如下图所示:

git:not a git repository (or any of the parent directories)

从图中可以看出,问题已经解决。

相关文章:

  • 2022-01-12
  • 2021-06-03
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
  • 2021-08-14
猜你喜欢
  • 2021-08-07
  • 2022-12-23
  • 2021-10-31
  • 2021-09-30
  • 2022-12-23
相关资源
相似解决方案