I mistakenly added the directory to git, and when I followed the prompt here to cancel the addition by doing git reset HEAD <file> , I was horrified to find that the current working copy of one of the files has a lot of changes (work!) back to the previous version!
As a result, I lost several hours of work ...: ((
I thought git reset HEAD <file> only "removes it from the current index without changing anything else . What did I skip?
Is it possible git reset HEAD <file> to check a file with HEAD?
How can I minimize the likelihood of something like this in the future?
Eternal learningner
source share