i have two Git repos, foo.git and bar.git whose working trees look like:


As shown above, there are 6 top-level sub-directories, namely foo1, foo2, 
..., & foo6 in foo.git and 2 top-level sub-directories, bar1 and bar2 in 

i tried to merge the 2 repos together by merging the content of bar.git 
into foo.git so the new foo.git will contain all the original top-level 
sub-dirs from both foo.git and bar.git:
   foo1  foo2  foo3  foo4  foo5  foo6  bar1  bar2

Here is what i did:
1.  #  in the top-level directory of the cloned foo.git, add the bar repo 
as remote_bar:
    git remote add bar_remote <barRepoGitURL>
    git fetch bar_remote

2.  #  merge the bar repo into foo
    git merge -s ours --no-commit bar_remote/master

3.  #  read the tree info into the index
    git read-tree -m -u bar_remote/master

At this time, i'm surprised to find out the top-level directory contains 
only the 2 sub-dirs of bar.git:
   bar1  bar2
and all the top-level foo[1-6] sub-dirs are gone so i can't proceed with 
commit and push.

Where did i screw up?

Thanks for reading.

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to