git reset --soft vs --mixed vs --hard: What Each One Moves, with Real git status and git log Output, and How to Undo a Reset with reflog

· Rahul Wagh · Nov. 30, 2026, 10:15 a.m.
Summary
This post explains the differences between `git reset --soft`, `--mixed`, and `--hard`, detailing how each command affects the current branch, index, and working tree. It emphasizes that while `--soft` retains changes staged, `--mixed` unstaged, and `--hard` discards changes, the `git reflog` can help recover lost commits. A note about using `git revert` for shared branches is also included, and a reference to further resources is made.