git状态返回“致命的:不是git仓库”但.git目录存在
我有一个目前无法推送的远程文件夹。当我直接进入远程目录并执行'git status'时,它显示:
I have a remote folder that I am currently unable to push to. When I go directly to the remote directory and a do a 'git status' it reads:
致命:不是git存储库
fatal: Not a git repository
.git文件夹确实存在,并且昨天工作正常,此后没有任何更改。
The .git folder does exists and it was working fine yesterday and nothing has changed since.
任何人都可以告诉我为什么即使.git文件夹存在,我也可能会收到此消息吗?
Can anyone tell me the reason(s) why I might receive this message even though the .git folder exists?
预先感谢您的帮助。非常感谢!
Thanks in advance for your help. Much appreciated!
如果.git文件夹的权限没问题,请查看文件 .git / HEAD
存在或没有错误地命名为 .git / head
。存在 .git / HEAD
(或者在裸机的情况下为HEAD)是对git存储库的二级检查
If the permissions on the .git folder are fine, see that there is a file .git/HEAD
existing or is not named wrongly like .git/head
. The presence of .git/HEAD
( or HEAD in case of bare) is the secondary check for a git repository