With git it appeared to be a very easy task.
git remote add test ../B && git fetch test
git merge test/master
git push (if you use a remote repo.)
You can also merge a subdir of one repo. into another. But to do so you need to use git filter-branch.
I love git! ;)