$ echo "Rebasing to Junio's master, excludes 4 documentation fixes." \ | git commit-tree HEAD^{tree} -p HEAD 3114b6d7eb96b9c35eab9b0dc7f50af954ae96e0 $ git checkout -b rebase-history 3114b6d7eb96b9c35eab9b0dc7f50af954ae96e0 $ git checkout builtin-merge $ git rebase -i junio/master # and here I really delete those 4 bogus commits