Reputation: 3489
I ran below command in my working directory.
git reset
It printed names of some files like
M /path/to/file
From What does 'git reset' command do without any option? I understand that git reset
= git reset --mixed HEAD
How do I undo the above operation?
Upvotes: 4
Views: 5991
Reputation: 18442
If you just did 'git reset' you have just unstaged your files, but you still have your modifications in your working directory. So you didn't lose anything, nor changed anything as you reset to HEAD.
Even if you had done a 'git reset HEAD~2' for example, which would have change your working directory, you could still use the reflog to recover, as explained in this question
Upvotes: 6