简体   繁体   中英

Is it possible to recover a deleted .git directory?

I inadvertently deleted the hidden .git folder and I haven't put my work on a Git remote repo. Is there a way to recover it?

I'm on Arch Linux.

Edit

All my files have been also deleted. 3 weeks of work and rm -rdf with the wrong directory name deleted all of them. I was hoping to find something that can help me to recover my files.

The .git folder is your repository. When you delete that folder you local repository is deleted. You can only recover that folder when you use your backup and restore that folder or you clone the repository again but then your changes until the last pushed commit are deleted.

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