Thread (7 messages) 7 messages, 3 authors, 2016-06-15

Re: how to use git merge -s subtree?

From: Sean <hidden>
Date: 2016-06-15 22:44:02

On Sun, 06 Jan 2008 02:22:47 +0100
David Soria Parra [off-list ref] wrote:
quoted
Here's another way that is perhaps a little cleaner:

$ git remote add -f B /path/to/B
$ git merge -s ours --no-commit B/master
$ git read-tree --prefix=sub/ -u B/master 
$ git commit -m "subtree merged B"
that works perfectly but it doesn't preserve the history, does it?
David,

Yes, the reason to start with the "--no-commit" merge is so that the history
is properly connected once you do the final commit step.  However, I should
have noted in my original message that none of the steps actually use the
subtree merge.  Instead they simply prepare a repository such that
future merging can be done with:

   $ git merge -s subtree B/master.

Cheers,
Sean
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help