When I run git rebase -i HEAD~2
, it lists 11 commits instead of 2. Why?
What I've done prior to this was:
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.