You can also use git-reflog to restore the branch back to the state it was before the merge. So instead of creating a temporary branch, you can inspect the reflog, find the entry before the merge commit and do git reset --hard HEAD@{X}.
That's true! I personally prefer having a symbolic name for my backup, but the reflog is also very useful for "oops" moments.
reflog saved me a few times, just remember that commits not referenced by a pointer (like HEAD or branch) can be GCed and disappear at any point. They are likely to be there right after a merge/rebase is finished, but may not be there anymore an hour later.
Afaik git branches are merely pointers to commits, so it makes sense, that one can go back finding the correct commit id.