Occasionally, my collaborators will "panic" when there is an automatic merge generated as the result a git-pull
, and just accept the default commit message. Before this commit gets pushed, I want to be sure the message gets fixed, but --amend
seems not to work. What is the best way to fix the message that's generated in this scenario. The best instructions I can come up with for them are
git reset --soft HEAD~
git merge -m <message> <the tracked remote branch>
but that seems a bit scary (reset
) and error prone (the remote tracked branch has to be entered explicitly).
Is there a simple way to change the commit message that was just generated by merging with a remote tracking repo? Why doesn't --amend
work?
git commit --amend
should work in this scenario. What exactly does not work?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With