繁体   English   中英

即使本地 Git 存储库仍在工作。git 文件已删除

[英]Local Git repo is still working even though .git file is deleted

我不小心在桌面上初始化了一个本地存储库,所以我删除了.git 文件,但即使我删除它仍然充当存储库。 git commands are still working and when I do git init is says initialized repo, but when git commands are already working and if I use git init it should show as re-initialized.

有人可以帮忙解决导致此问题的原因吗?

您可能在其他父目录中有另一个.git文件夹。

从您认为 git 命令不起作用的地方运行: git rev-parse --git-dir

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM