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

有帮助吗?

解决方案 4

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top