I was stepping through a tutorial on how to stage items before committing and noticed that I added a folder full of stuff that didn’t need to be in the source tree. I followed the instructions on how to remove items (git rm HEAD file), ran a git status and noticed the folder was still in the list of staged items. I tried a few more times with the same result. I then found the git reset -hard command, ran that, and poof. A months worth of work was not only removed from the staging area, but physically deleted from my hard drive.
Why is this allowed to happen? I wanted to remove items from the staging area, not my hard drive, so why does git think it owns things not in the staging area? And is there any possible way to get that month’s worth of work back?
Thanks for any help