In git, a branch is basically a pointer on a commit. So your branch B is a pointer to the last commit of the branch B.
When you do git merge branchB
on branch A, git is going to select this last commit plus all its ancestors that were not already on branch A.
So the merge is already "merging the entire branch".
You can see it, if the merge succeeded, by doing afterwards git diff HEAD^1 HEAD
. This should show you all the modifications applied from branch B.
What may be confusing you is the git log
display : it will show a merge commit whose parents are both tip of branch A and tip of branch B. This is actually what a git merge is about : trying to create a commit from two different parents.