我有一个看起来像这样的存储库:
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
我真的很困惑。我知道它猜测要自动合并到的目录,我可以覆盖它吗?