The Power of Understanding "HEAD Just Moved"

The commit stays. Only where HEAD points moves
The commit stays. Only where HEAD points moves

git reset --soft is really just moving HEAD. The commit didn't vanish. HEAD (and the branch it points to) simply started referring to a different commit. This understanding is more powerful than it might seem.

When people get confused in Git, they tend to think "what got deleted?" or "what broke?" But once you think in terms of "where is HEAD right now?", you can read any situation clearly. As reflog shows, the commit is still there. HEAD just moved. That's why you can always go back.

This mental model, "HEAD just moved," carries over directly to branches and merges. Switching branches, merging, rebasing: they all come down to which commit HEAD and other references are looking at. Understanding the mechanism will pay off again and again.

Understanding beats memorization. That's the fastest way to get comfortable with Git.