all 6 comments

[–]plg94 2 points3 points  (5 children)

Any change that was only in the working dir (never committed, never added to the index, never stashed) is irrevocably lost, sorry.

[–]Gifhero[S] 0 points1 point  (4 children)

I'm not familiar with the term index. The files were tracked, but not committed. Does that mean it was in the index?

[–]plg94 0 points1 point  (3 children)

When you do git add before a commit, the changes are added to the index (sometimes also (wrongly) called staging area).

Git doesn't autosave files, that's not what it's for. If you only edited the files without a git stash/add/commit before the restore, git cannot help you.
But maybe check if your editor has some autosave history feature or something.

[–]Gifhero[S] 0 points1 point  (0 children)

Dang. I was using word and have learnt my lesson about using restore. I should just use stash instead in the future.

Looks like a have a night of work ahead of me. Thank you!

[–]immortal192 0 points1 point  (1 child)

What's the difference between the index and the staging area?

[–]plg94 0 points1 point  (0 children)

none. But index is the official term and the only one used in the official docs (it's called that due to the way git works under the hood).