Said Kaldybaev Said Kaldybaev - 10 days ago 10
Git Question

Is it still possible to restore deleted untracked files in git?

let's say yesterday I did some changes on my master branch, and I forgot to add, commit them. and in the morning i did

git reset --hard


is it possible to restore deleted files in this situation ?

Answer

Some better IDEs keep track of your files as a local history. If you removed files externally (say, git reset) you should be able to click in your IDE on parent directory and choose "Compare with local history".

I used this feature successfully in PHPStorm IDE when my untracked files got wiped out by some utility...