I have the follwing situation:
$ git --version git version 2.7.3.windows.1 $ git log --graph --oneline * 83e3254 version 1.1 * 34188af merge of feature into master |\ | * 784ba31 awesome change |/ * 6eec273 added file1 * 84d80a5 added version file To reproduce this in a new directory
rm -rf .git git init echo version 1.0 > version.txt git add version.txt git commit -m "added version file" echo file1 > file1 git add file1 git commit -m "added file1" git checkout -b feature echo awesome change >> file1 && git commit -am "awesome change" git checkout master git merge --no-ff --no-commit feature echo "small fixup" >> file1 git commit -am "merge of feature into master" echo version 1.1 > version.txt git commit -am "version 1.1" Now I saw this feature was meant for version 1.1. So I did this:
git rebase --preserve-merges -i master~3 with this as git-rebase-todo
pick 6eec273 added file1 pick 83e3254 version 1.1 pick 784ba31 awesome change pick 34188af merge of feature into master and got this:
$ git log --graph --oneline * 34188af merge of feature into master |\ | * 784ba31 awesome change |/ * 6eec273 added file1 * 84d80a5 added version file what happened to 83e3254? Have I missed something? Should I use 34188af in the todofile when I need to preserve merges?