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 :(((

Était-ce utile?

La solution 4

Autres conseils

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top