Er... why is everyone making this so complex?
git checkout trunk # Switch to "trunk" git checkout branch . # Overwrite with "branch", but stay on "trunk" git commit
Now branch is the same tree object as "branch", but without the history.
Of course, you could be even nastier and di a direct
git-commit-tree branch^{tree} -p HEAD < commit_messageBut that's not really necessary.
Starting from the branch, using the high-level commands is a bit awkward, but it's easy enough to:
git-update-ref HEAD trunk git-commit