I have source branch A. I branched B from it.
in B I have moved some folders under another physical folder named TB.
Now I want to merge from A to B, but the hierarchy had changed for some folders.
How can I solve this?
I tried to create temporary TB folder in A as well, but merging didn’t work.
see:

The error says you deleted a file from A and are now trying to merge the file from B back into A. It doesn’t appear to be squawking about a newly added or renamed directory.
Quite frankly it looks like you branched A => B. Then moved stuff around in A and are now trying to merge B back into it… with the files in the old location in B.
I would just pick “restore the file and merge my changes from B”.