Hi Rémi, > 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`.
Thank you for your input. Yes, i misconstrued the git-read-tree man page. What you suggested appears to be working but i need to confirm with other developers who contributed to the Scala code base for a quick sanity check before i finalize the merge. Anyway, much appreciated. > ... and simply move the content from bar into foo without the history i thought the GraphPoint approach Martin suggested does preserve all the history or i misconstrued again Moreover, should the "git remote add ..." + "git fetch ..." + "git rebase ..." approach Magnus pointed out also preserves history. Or you were referring to the rebase which abandons existing commits and creates new ones (thus non-fast-forward) ... On Mon, Apr 6, 2015 at 4:28 PM, Rémi Rampin <remiram...@gmail.com> wrote: > 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 a topic in the > Google Groups "Git for human beings" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/git-users/4yTs3aCCU8M/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > git-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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.