Question

I didn't realize this would delete everything:

git clean -d -f -x

How do I recover the lost files after the command above?

edit:

my setup is virtualbox with ubutu as a virtual machine. I've deleted everything outside of the repo from my home directory :(((

Was it helpful?

Solution 4

OTHER TIPS

Invoking git clean removes all files that are not controlled by git - meaning they were not committed before. Therefore they were not stored in repository at all, and cannot be recovered.

It doesn't delete everything; it only delete untracked files (the ones that aren't in the repository).

git can't possibly restore files that aren't in the repository.

There is no recovering files after using git clean in your repository.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top