Choosing How to Undo Is an Engineering Skill

Pick the one that fits the situation. That's judgment
Pick the one that fits the situation. That's judgment

The same desire to "redo something" can call for reset, revert, or amend, depending on the situation. Has it been pushed? Is the team sharing it? Do you want to keep your working tree changes? There's no single right answer.

This applies beyond Git. When something goes wrong, do you start over from scratch, fix it while keeping a record, or just tweak the last step? Choosing the right tool for the situation is far more valuable than memorizing commands.

You don't need to master all of these right now. What matters is knowing that there are different kinds of undo. That alone changes the keywords you search for when you're stuck, and the quality of answers you find.

Knowing your tools, and knowing when to use each one. That's what makes an engineer.