DEV Community


Discussion on: 15 Git Commands You May Not Know

grant_bartlett profile image

git commit --amend is great, I use it all the time if I've forgotten something that needed to be in my staged commit. Or if I just want to alter my commit message and give it more detail.

However, if your memory is terrible like mine and you've forgotten that the commit you're now amending has already been pushed? Good luck, you'll conflict yourself. Git really shouldn't let you amend a commit that's been pushed already...