2015-04-03 1:51 EDT, SoaringEagle <hseum...@gmail.com>:

> 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.
>

This is, in fact, the correct behavior documented in git-read-tree(1)
<https://www.kernel.org/pub/software/scm/git/docs/git-read-tree.html#_merging>
:

If only 1 tree is specified, git read-tree operates as if the user did not
specify -m, [...]


What you want is the behavior of git-merge(1)
<https://www.kernel.org/pub/software/scm/git/docs/git-merge.html>, just
replace the `merge -s ours ; read-tree -m` with a single `git merge
bar_remote/master`.


Others have described ways to not merge the branches, and simply move the
content from bar into foo without the history, which might or might not be
what you want (but not what you asked for).

-- 
Rémi

-- 
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