Say there are two repositories X and Y with a file structure like below.
X-+
|- /A
|- /B
|- /C
Y-+
|- /E
|- /F
|- /G
I know it's possible to pull X into Y and git will merge the files. Is it possible to pull directory B into directory F of repository Y? I'm guessing it isn't because git doesn't track directories. Is it possible to achieve this with git in some other way?