0
点赞
收藏
分享

微信扫一扫

git解决 fatal: not in a git directory

zhongjh 2023-11-06 阅读 39

git解决 fatal: not in a git directory
 
问题描述:
执行下面语句时报错:fatal: not in a git directory

git config --global user.name "yourName" //注意,--和global之间没有空格
git config --global user.email "yourName@gmail.com"
 

先进入git目录,或使用 git init 新建一个 Git 仓库。
然后再执行即可。

如果报错:
error :key does not contain a section: global

出现错误的原因是–和global之间加了空格,去掉即可



举报

相关推荐

0 条评论