“致命的:不是git存储库(或任何父目录)”从git状态 [英] "fatal: Not a git repository (or any of the parent directories)" from git status
本文介绍了“致命的:不是git存储库(或任何父目录)”从git状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
git clone a-valid-git-url
例如:
git clone git://cfdem.git.sourceforge.net/gitroot/cfdem/liggghts
然而, git status
(或任何其他git命令)会给出上面的致命:不是git存储库(或任何父目录)
error。
我做错了什么?
解决方案
$ git clone git://cfdem.git.sourceforge .net / gitroot / cfdem / liggghts
克隆到'liggghts'...
remote:计数对象:3005,完成。
remote:压缩对象:100%(2141/2141),完成。
remote:共计3005(delta 1052),重用2714(delta 827)
接收对象:100%(3005/3005),23.80 MiB | 2.22 MiB / s,完成。
解决三角洲问题:完成100%(1052/1052)。
$ git status
致命错误:不是git存储库(或任何父目录):.git
$ cd liggghts /
$ git status
#分支大师
没有提交(工作目录干净)
This command works to get the files and compile them:
git clone a-valid-git-url
for example:
git clone git://cfdem.git.sourceforge.net/gitroot/cfdem/liggghts
However, git status
(or any other git command) then gives the above fatal: Not a git repository (or any of the parent directories)
error.
What am I doing wrong?
解决方案
You have to actually cd into the directory first:
$ git clone git://cfdem.git.sourceforge.net/gitroot/cfdem/liggghts
Cloning into 'liggghts'...
remote: Counting objects: 3005, done.
remote: Compressing objects: 100% (2141/2141), done.
remote: Total 3005 (delta 1052), reused 2714 (delta 827)
Receiving objects: 100% (3005/3005), 23.80 MiB | 2.22 MiB/s, done.
Resolving deltas: 100% (1052/1052), done.
$ git status
fatal: Not a git repository (or any of the parent directories): .git
$ cd liggghts/
$ git status
# On branch master
nothing to commit (working directory clean)
这篇关于“致命的:不是git存储库(或任何父目录)”从git状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文