I make this git mistake sometimes and its incredibly annoying. I was wondering whether anyone in the community had ideas for what to do when you accidentally do a commit --amend on the head of a remote branch. Right now I end up doing a pull, diffing against my own partial change, and pushing, resulting in a duplicate commit message on the HEAD.
For clarity, I'm asking the best way to fix the following:
- Pull remote branch (e.g. master)
- Make change
- Commit --amend change
- Try to push, get rejected
- Curse self and/or gods