1
我有一个仓库,看起来是这样的:Git的子树合并策略没有选择正确的目录
foo/
subrepo/
a_file_in_subrepo
another.ext
unrelated_file
subrepo
在GitHub上的存储库,而我在我的仓库远程,说sub
,跟踪它,但没有文件被合并。
我想要的是合并在sub/master
在subrepo
文件夹。我知道a_file_in_subrepo
和another.ext
正是因为它们在sub/master
但如果我跑git merge -s subtree sub/master
我没有得到我想要的东西,而是得到:
foo/
subrepo/
a_file_in_subrepo
another.ext
unrelated_file
a_file_in_subrepo
another.ext
我真的很困惑。我知道它猜测目录要自动合并,我可以覆盖它吗?