简体   繁体   中英

Git clone deleted all files in directory

This is partly me being silly, and stupid. I thought it was worth seeing if anyone had any idea how I can get my stuff back.

I enabled 2FA on my github, and created an empty repo online. I cloned it in using git bash. When I saw the directory was in, I cut and pasted my code into that directory. I then saw it hadn't cloned the .gitignore. I checked bash, and it required me to put in my username and password. I did, but it came up with an error, because of the 2FA. It then deleted the entire directory, along with the rest of my code in it.

I couldn't recover it using git lost-found, nor using EaseUS or Recuva. Any ideas?

If you cut your files, then if you're lucky they may still be in your clipboard. Try repeating the 'paste' command in a new empty folder.

Barring that, 'undo' may come through for you. Try pressing ctrl-z in the file browser, in the directory you cut your code from.

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