Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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".



Right. And notice all the diagrams. So why use words when pictures better reflect reality?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: