Git: Subtree Merge into a Deeply Nested Subdirectory?

前端 未结 2 645
太阳男子
太阳男子 2021-02-07 04:33

I\'m attempting to use git\'s subtree merge stategy where the subdirectory into which I want to merge is nested fairly deeply - currently four levels deep.

I followed th

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-07 05:11

    The subtree merge strategy artificially limits the depth of its search for where the subtree “fits” into the overall tree. Unfortunately this limit is hard coded (see match-trees.c:267).

    Luckily, Git 1.7.0 added the subtree=… option to the (default) recursive merge strategy. This option lets you exactly specify the prefix so that Git does not have to guess (as much).

    With Git 1.7.0 or later, try this:

    git pull -X subtree=sites/all/modules/my_module REMOTE_REPO master
    

提交回复
热议问题