Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

Re: Merge two repos with history included? (was Re: How do I..?)

From: Miklos Vajna <hidden>
Date: 2016-06-15 22:45:49

On Mon, Dec 22, 2008 at 02:04:06PM -0800, Dylan Martin [off-list ref] wrote:
I tried converting an existing SVN repo to git and then adding it to
my main git repo using the subtree merge technique described at
http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html.
 I now have the various files in my repo, but they have no history.
They have, but you are right about that - due to the nature of subtree
merge - git log <path> will show only the merge commits. (However git
blame works fine, for example.)
I checked, and my initial SVN to git conversion does contain history.

I'm trying to add an exising repo as a subdir of my main repo with
history included.  Can anyone tell me how to do that?
I would try the following: Let's say you have super.git and foo.git, and
you want to merge foo.git to the subdirectory 'foo' of super.git. Then
you can do in foo.git:

mkdir foo
mv * foo
git add foo
git commit -a

Then in super.git:

git pull path/to/foo.git master

And then git log --follow should work just fine on any merged files as
well.

Attachments

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