TL;DRTL; DR
The --preserve-merges flag simply tells git-rebase to try to recreate merge commits instead of ignoring them. It does not give git rebase the ability of rememberingto remember how merge conflicts were resolved, i.e. it does not record conflict resolutions for future use. What you want to use for that is rerere.
git init echo Hello > Hello.txt git add Hello.txt git commit -m "Create Hello.txt (commit A)" git tag start echo World! >> Hello.txt git commit -am "Change to Hello World (commit B)" git checkout start git checkout -b branch echo Dave >> Hello.txt git commit -am "Change to Hello Dave (commit C)"
git init echo Hello > Hello.txt git add Hello.txt git commit -m "Create Hello.txt (commit A)" git tag start echo World! >> Hello.txt git commit -am "Change to Hello World (commit B)" git checkout start git checkout -b branch echo Dave >> Hello.txt git commit -am "Change to Hello Dave (commit C)"
git merge master
git merge master
echo "Hello World, Dave!" > Hello.txt git add Hello.txt git commit -m "Merge branch master into branch (commit D)"
echo "Hello World, Dave!" > Hello.txt git add Hello.txt git commit -m "Merge branch master into branch (commit D)"
git checkout start git checkout -b goodbye-branch echo Goodbye > Goodbye.txt git add Goodbye.txt git commit -m "Add Goodbye.txt (commit E)"
git checkout start git checkout -b goodbye-branch echo Goodbye > Goodbye.txt git add Goodbye.txt git commit -m "Add Goodbye.txt (commit E)"
git checkout branch git rebase -p goodbye-branch
git checkout branch git rebase -p goodbye-branch
git config --global rerere.enabled true
git config --global rerere.enabled true