试试这个,如果我理解这个问题,那么这就是你想要的:
on branch-Master(Q1): has a, b, c
from branch Master(Q1) -> checkout/switch to Feature branch(F)
> git checkout -b F
From Feature branch(F): git merge `Q2`
> git merge Q2
如果不起作用,请让我进一步知道。
编辑:
If you want only a file from Q2:
git checkout Q2 file1
If you want entire folder from Q2:
git checkout Q2 -- c
Note: c is the folder from Q2, c could be a directory path as well, like :
folder1/c
But its not a git merge.