Undoing Changes: restore, reset, revert, and stash
GitGit has four different ways to undo something, and they are not interchangeable. Using the wrong one is how "undo my last commit" turns into "where did my work go" — understanding what each command actually moves (working directory, staging area, or history) fixes that.
10 min read•2026-08-08