Chapter 04 ยท 10 min read
Undoing Changes: restore, reset, revert, and stash
Git 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.