git checkout -b new_branch old_branch
git checkout <branch1name> # <branch1name> is the new branch
git merge <branch2name> # <branch2name> is the branch from which you want to copy
git checkout BranchB
git merge BranchA
git checkout old_branch
git branch new_branch