Suppose there are two git repositories with some files in them:
ProjectA + a + b ProjectB + foo/x + foo/y + bar/z
Now I want to include the foo directory from ProjectB into ProjectA.
As far as I understand, when I do git subtree add , prefix is the path it should have in the receiving repository, so when I do
git subtree add --prefix=project_b --squash URL_of_ProjectB
I would end with
ProjectA + a + b + project_b + foo/x + foo/y + bar/z
Is there any way to indicate that I only need foo to get this layout?
ProjectA + a + b + project_b + x + y
source share