From remote
/ABC
branch I want to pull everything except P
folder (recursively) to the local current branch.
From remote
/XYZ
branch I want to pull only P
folder (recursively) to the local current branch.
How to do this?
From remote
/ABC
branch I want to pull everything except P
folder (recursively) to the local current branch.
From remote
/XYZ
branch I want to pull only P
folder (recursively) to the local current branch.
How to do this?
I don't think you can do it easily because git need to know what branch you are on, it sounds like you want to use Git Submodules for this, each folder can be a different submodule, this will allow you to have different versions for the folders
However, if this is one time need, you can pull XYZ
and copy P
content aside, then pull ABC
and copy and overridden P
folder back from the copy you made, the result would be that you are on ABC
branch but with changes for P
folder that are the same as in XYZ
.
note that you will have local changes because you are on ABC
but your P
folder is different