Comment by chris_wot

7 years ago

The issue is with understanding staging and the working directory. The lightbulb moment for me was reading this article from Atlassian:

https://www.atlassian.com/git/tutorials/resetting-checking-o...

Understanding that git reset --soft moves HEAD but doesn't change the staged snapshot or working directory, whilst --mixed updates the staged snapshot to match the commit but doesn't touch the working directory was very useful. And knowing that reset --hard updates both staging and the working directory to the commit was where I suddenly "got it".