Re:Key Git Concepts Explained the Hard Way
by kccqzy on Wednesday March 14, 2018 @04:27PM
(#16588002)
Isn’t `git commit --amend` enough? No need to reset and commit again.
[ Parent
| on HN ]
Re:Key Git Concepts Explained the Hard Way
by SiVal on Wednesday March 14, 2018 @04:58PM
(#16588230)
Sometimes it's easier to undo & redo. That's the reset approach. (Reset, your mistake goes away, do it over again but right, then commit.)
Sometimes it's easier to just make another change. That's the amend approach. (Keep what you've got, which was almost right, make another change--add, delete, or edit--so it's right, and re-commit as if you'd made that additional change from the start.)