Git: interactive rebase lists incorrect (too many) commits
I fixed this by doing a rebase with master first and then for the rest of the commits
git rebase master
git rebase -i HEAD~n
It depends on how your git
tree looks like. A "merge" commit for instance can have two or more parents. Depending on this, your commit can have multiple grandparents.
You probably need to rebase with
git rebase -i HEAD^1^2
git rebase -i HEAD^2^1
git rebase -i HEAD^2^2
(one of these three).
See here for more details about git
's relative commit notation.