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

首次使用git命令报这个错:
fatal: not a git repository (or any of the parent directories): .git
分析:
错误提示没有git存储库(或任何父目录):.git
解决方案:

  1. 执行git --help
    fatal: not a git repository (or any of the parent directories): .git
    -init 参数的意思
    Create an empty Git repository or reinitialize an existing one(创建一个空的Git存储库或重新初始化一个现有的存储库)
  2. 执行 git init

问题解决!!!!