News for hackers. Stuff that matters.
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.
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.)

Re:Key Git Concepts Explained the Hard Way by dralley on Wednesday March 14, 2018 @04:51PM (#16588188)
Maybe if you only need to add something, but not if you included something you didn't want to in the commit, but you still want to leave the change there.