git clone之后输入git status报错:没有找到.git文件

来源:互联网 发布:python 获取 roe 编辑:程序博客网 时间:2024/06/16 12:47

当我用 git 将代码 clone 到本地之后,对代码做了修改,然后输入 git status 查看状态时,报了如下错误:

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


原因:当前目录下没有.git 文件


解决方案:进入下一层目录即可。

如:

$ git clone git://cfdem.git.sourceforge.net/gitroot/cfdem/liggghtsCloning 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 statusfatal: Not a git repository (or any of the parent directories): .git$ cd liggghts/$ git status# On branch masternothing to commit (working directory clean)


原创粉丝点击