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

How to include references to subfolders

From
NNorike <norike@gmail.com>
Date
Sep 7, 2017, 07:19 UTC
Message-ID
<d15333d0-d9eb-a106-592b-47635fd1cb66@gmail.com>
Hello,

I've been searching what's the best way to include a reference to a subfolder/subdirectory from a (secondary) remote repo into a subfolder of my (primary) repo.

Here I found some approaches: https://stackoverflow.com/a/30386041/509369

Where the first 3 options don't seem to support sending changes back to the mainstream; and the 4rth is replicating the whole repo.

Ideally:
- The reference is stored somewhere in the (primary) repo so when 
someone clones it, the referenced folder (from the secondary repo) is 
also cloned.
- You can pull changes from the remote repo into the subfolder of your repo.
- You can make changes to the subfolder directly from your (primary) 
repo, and push them to the remote repo (of course depending on the 
privileges of the remote repo).
- Allow multiple remote subfolders.
Extra: it could be more complex, but what about single remote files?

I'm not sure if this is possible with the current set of git tools, if it can be added in a future or if it's just a no-sense question.

Thanks in advance!
-- 
Salut,
Yeray
Message 1 of 1 in “How to include references to subfolders”
  1. NorikeSep 7, 2017

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.