# Correct way to pull using subtree merge without guesswork?

2 messages from 2012-01-24 to 2012-01-24. Participants: Manuel Reimer, Junio C Hamano.
Thread: https://gitlist.dev/t/29438

## Manuel Reimer, 2012-01-24 17:49

Subject: Correct way to pull using subtree merge without guesswork?
Message-ID: <jfmr88$1p8$1@dough.gmane.org>
URL: https://gitlist.dev/e/jfmr88%241p8%241%40dough.gmane.org

```
Hello,

can someone please tell me, if this is the correct syntax for using "git pull" 
to pull in "subtree merging strategy", if I don't want to allow git to guess 
where to do the changes:

git pull -s subtree -X subtree=path/to/subtree externalproject master

Returns with success, but is "-X subtree=" the right way to force a subtree path 
and disallow git to autodetect the subtree?

$ git --version
git version 1.7.4.4

Thank you very much in advance

Yours

Manuel

```

## Junio C Hamano, 2012-01-24 18:27

Subject: Re: Correct way to pull using subtree merge without guesswork?
Message-ID: <7vy5sx2byi.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vy5sx2byi.fsf%40alter.siamese.dyndns.org
In-Reply-To: <jfmr88$1p8$1@dough.gmane.org>

```
Manuel Reimer <Manuel.Spam@nurfuerspam.de> writes:

> git pull -s subtree -X subtree=path/to/subtree externalproject master
>
> Returns with success, but is "-X subtree=" the right way to force a
> subtree path and disallow git to autodetect the subtree?

More or less. Note that with the syntax, you cannot still express the
distinction between mapping the root of external to path/to/subtree of
your current tree and mapping the other way around, but that is not an
issue in practice.

By the way, I had an impression that "-X subtree" makes "-s subtree"
redundant and unnecessary.

```
