简体   繁体   中英

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

I have accidentally initialized a local repo on a desktop so I have deleted.git file but even though I delete it is still acting as a repo. 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.

Could someone please help with what's causing this issue?

You may have another .git folder in some other parent directory.

Run: git rev-parse --git-dir from a place where you would expect git commands to not work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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