git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Q. regarding subtree merge

From
SBSanti Béjar <sbejar@gmail.com>
Date
Apr 18, 2008, 12:59 UTC
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 <stefan.naewe@googlemail.com> wrote:

> 2008/4/18, Santi Béjar <sbejar@gmail.com>:
>
[...]
Show 9 quoted lines
>  >
>  >  $ 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
Previous: Stefan Näwe
Message 5 of 5 in “Q. regarding subtree merge”
  1. Stefan NäweApr 18, 2008
  2. Santi BéjarApr 18, 2008
  3. Santi BéjarApr 18, 2008
  4. Stefan NäweApr 18, 2008
  5. Santi BéjarApr 18, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.