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

Re: how to use git merge -s subtree?

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 6, 2008, 02:42 UTC
Message-ID
<7vir277jz6.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<47803CB6.4050102@gmx.net>
David Soria Parra <sn_@gmx.net> writes:
> Well yes the history is preserved, but it's not connected to the
> subdirectory. So you cannot do git-log B/foo.c as git doesnot know where
> to search it as it thinks
> it is in /foo.c not in B/foo.c

The thing is, what you are talking is not about the subtree merge strategy, but the fundamental philosophy of git. Asking for "the history of file B/foo.c" does not make any sense, as git never tracks history of individual files.

I'll point you to one of the most important messages in the whole archive of the git mailing list.

 http://thread.gmane.org/gmane.comp.version-control.git/27/focus=217
Previous: David Soria ParraNext: Sean
Message 6 of 12 in “how to use git merge -s subtree?”
  1. Miklos VajnaJan 5, 2008
  2. SeanJan 6, 2008
  3. David Soria ParraJan 6, 2008
  4. SeanJan 6, 2008
  5. David Soria ParraJan 6, 2008
  6. Junio C HamanoJan 6, 2008
  7. SeanJan 6, 2008
  8. Junio C HamanoJan 7, 2008
  9. SeanJan 8, 2008
  10. Junio C HamanoJan 8, 2008
  11. Miklos VajnaJan 6, 2008
  12. David Soria ParraJan 6, 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.