简体   繁体   中英

I accidentally deleted some local files in my git repository

I have a folder which is my git local repository, and there are two folders in it the web folder and backend folder .

I ran this command git rm -r -f web and then all my files inside the web folder were gone, and now I can't find it, I tried to look for it in the trash, but the files aren't there, is there a way I can go back in time and restore all the files?

此命令将帮助您检索以前的提交,

git checkout $(git rev-list -n 1 HEAD -- "$file")^ -- "$file"

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