To offer yet another solution, you can do this with a form of rebasing (which I believe will be the most accurate answer to your actual question). This solution will actually move the commits from one place to the other, no merging.
As always with a rebase, the command includes references not to commits but to parents of commits. For instance, a simple rebase of a feature branch on top of a master branch with “$ git rebase master” is a shorthand for “$ git rebase master feature”, meaning, “take the commit that master and feature have in common, consider that commit as the old parent commit, and replace that old parent commit by the new parent commit; namely the head of master.” The automatic consequence is the moving of commits from one branch to the other. This basic scenario shows you why rebasing is concerned with parents of commits, and not with ‘moving commits around’. (I hope this helps as an introduction to what follows.)
For your situation the solution is similar in its logic, but the command involves the —onto flag and uses commit hashes instead of branch names. (This is quite identical, as branches just point to commits.) If you identify the commit hash of the commit that you branched off of (say sha1), that will be the ‘old parent’. The new parent will be the commit hash that is the head of your branch that you mention; let’s call this sha2. Then the solution to your problem is
$ git rebase —onto sha2 sha1
Which replaces the old parent by the new parent, which essentially takes the commits to the branch that you want them.
Until here your question is basically answered, as this moves the commits, but with this solution you’ll still be in detached head state. For those final steps there are many different approaches. I’d suggest to use $ git checkout -b temp; $ git checkout yourbranch; $ git merge temp; $ git branch -D temp;
The final steps are not that interesting, but I urge everyone to have a solid understanding of the git rebase —onto command. It’s the essence of the problem, and an invaluable skill for the future :)