6

We are having an issue where the command:

git subtree pull --prefix=Root squash root master 

is pulling code from the root repository into the . directory of our repository instead of the Root directory.

This command has worked fine in the past. The only difference is it has been a while since we have done a pull, so there are quite a few changes to merge.

I can't seem to find any official documentation on "git subtree", but there is a lot on the subtree merge strategy used with "git pull -s subtree". What is the difference (if any)?

2

1 Answer 1

8

git subtree is an "alternative to submodules", see https://github.com/git/git/blob/master/contrib/subtree/git-subtree.txt or https://medium.com/@porteneuve/mastering-git-subtrees-943d29a798ec

git pull -s subtree or git merge -s subtree selects the subtree merge strategy: http://git-scm.com/book/en/v1/Git-Tools-Subtree-Merging

See also the answer to When to use git subtree?

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.