The "committed to wrong branch" case is also a little overly complex. I'd just do:
git checkout correct-branch
git cherry-pick wrong-branch
git checkout wrong-branch
git reset --hard HEAD~