From: Santi Béjar Date: Fri, 18 Apr 2008 12:59:57 GMT Subject: Re: Q. regarding subtree merge Message-ID: <8aa486160804180559y70c72449g8f0beff63c229c7b@mail.gmail.com> In-Reply-To: <60b759020804180518k2fc1957bk60a5d7cdac8c3991@mail.gmail.com> On Fri, Apr 18, 2008 at 2:18 PM, Stefan Näwe wrote: > 2008/4/18, Santi Béjar : > [...] > > > > $ git reset --soft libfoo/current-work > > > > OK. Thanks. It worked without the merge. > I did another test where the 'super-prj' was not empty, this time with > 'git merge -s...' and > that worked as well. So: > If you have an empty super-prj -> drop the merge + git reset --soft commit If not the next "git merge -s subtree" will fail. > If you have a non-empty super-prj -> do the merge > > But I really don't understand (yet...) why it is as it is... Because you cannot merge an empty branch with another branch. Maybe "git merge -s ours" should fail in this case, because it does not make sense to merge an empty branch with the "ours" strategy. Santi