git merge conflict after git amend - "Your branch and 'origin/master' have diverged"
You changed an existing pushed commit, creating your own version (since its content has changed)
--x---Y (master: that is the X amended)
\
--X (origin/master)
That is why you have 1 and 1 different commit each between master and origin/master
What can I do to prevent this?
Don't "amend" an existing pushed commit (only local not-yet-pushed one)
How do I reconcile master with local after a git amend?
Simply rebase on top of origin/master, then push
git rebase origin/master
--x--X---Y' (master)
|
(origin/master)
git push
--x--X---Y' (master, origin/master)