Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does git clean support moving to Recycle Bin?

I would feel much more comfortable using git clean if I knew I could undo the deletion in case something goes wrong.

Does it support Recycle Bin in any way, shape or form? If no, are there any workarounds that anyone knows of, such as an external tool using git clean -n to print out the files, and then moving them to Recycle Bin?

like image 936
sashoalm Avatar asked Jul 10 '14 08:07

sashoalm


1 Answers

No, unfortunately!! git doesn't have this privilege. Whatever gone is gone!!

git clean -fdxn

Will do a dry run, and show you what files would be deleted if you ran

And one more thing, that if you have added files and somehow deleted those files. In this case, you can restore these files by using below command:

'git fsck --lost-found'

It's worth a try, but don't get your hopes up too much.

like image 139
love Avatar answered Nov 03 '22 01:11

love