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

Re: Elegant subdirectory checkout of remote-tracking branch?

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 1, 2013, 18:05 UTC
Message-ID
<7vwqtrf120.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20130301152253.GA9312@odin.tremily.us>
"W. Trevor King" <wking@tremily.us> writes:
> Any suggestions for an elegant solution would be appreciated :).

My Meta checkout is not a submodule of anything. It is a totally independent repository and is not linked with git.git in any way. It started as an independent repository, and it still is.

That it has been pushed to the same repository at k.org was a mere historical accident (I only had that repository writable there when I started); it not even a recommended practice to publish unrelated histories in a single repository. You are seeing 'todo' in some of my public mirrors only due to historical inertia.

Just treat the git.git primary directory and the Meta directory as what they are: two checkouts of two totally independent projects, one of which happens to be designed to be checked out at a fixed location relative to the other. When running "pull --ff-only", do so in both independently.

That is what I do in my secondary repositories.
> Once we figure something out, I can write it up and stick it in
> howto/maintain-git.txt.

You are free to write and do whatever suites yourself, but a description of a workflow that is not what I use does not belong to the howto/maintain-git.txt document ;-)

Previous: W. Trevor KingNext: Jeff King
Message 2 of 3 in “Elegant subdirectory checkout of remote-tracking branch?”
  1. W. Trevor KingMar 1, 2013
  2. Junio C HamanoMar 1, 2013
  3. Jeff KingMar 2, 2013

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.