Re:Oh shit, git: Getting myself out of bad situations
by chiefalchemist on Wednesday December 20, 2017 @07:08PM
(#15975142)
Right. And notice all the diagrams. So why use words when pictures better reflect reality?
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".