git checkout vs git reset
It's not clear what the difference between the two? When should we use one command or the other? Thanks in advance
1 answers ( 0 marked as helpful)
use soft command when you want to move HEAD to previous commit and at the same time the changes would be staged.
Use mixed command when you want to move HEAD to some previous commit and at the same time the changes would be unstaged.
And use hard command when you want to move HEAD to some previous commit and also to go back to previous version of the file.