git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to merge by subtree while preserving history?
@ 2009-03-26 22:59 David Reitter
  2009-03-27  7:38 ` Miklos Vajna
  0 siblings, 1 reply; 4+ messages in thread
From: David Reitter @ 2009-03-26 22:59 UTC (permalink / raw)
  To: git

I have two separately developed projects (foo, bar) which I'd like to  
merge; the contents of foo should, initially, go in a subdirectory of  
bar.

I'm aware of two methods:  moving (renaming) everything within foo  
into foo-dir, and then just pulling foo into bar.

This works beautifully, except that the big rename causes havoc w.r.t.  
to the files histories, i.e. git-log needs a "--follow" argument now,  
and "diff-tree" can't track changes when given the new file name.  No  
good.

I've also tried the method described in [1], but it seems that all  
history is lost here (the text could point this out..)
I've tried to "git pull -s subtree foo master" directly as well, but  
then it put foo into strange places (and lost the history).


So, I'm at a loss.  Suggestions much appreciated.




[1] http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-03-27 17:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-26 22:59 How to merge by subtree while preserving history? David Reitter
2009-03-27  7:38 ` Miklos Vajna
2009-03-27 16:56   ` David Reitter
2009-03-27 17:20     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).