Actualy, there’s a really cool command I learned recently that will do exactly what you want:
git commit-tree -p HEAD^2 -p HEAD^1 -m "Commit message" "HEAD^{tree}"
This will create a new commit based on what is currently HEAD, but pretend that it’s parents were HEAD^2,HEAD^1 (note this is the reversed order).
git-commit-tree prints the new revision as output, so you might combine it with a git-reset-hard:
git reset --hard $(git commit-tree -p HEAD^2 -p HEAD^1 -m "New commit message" "HEAD^{tree}")