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

Is it possible to treat symlinks just as normal files in Git?

From
MMMikhail Merkuryev <mercury13@ukr.net>
Date
Apr 22, 2022, 23:40 UTC
Message-ID
<9a1a7a84-76a6-c710-414d-fa566a3e0793@ukr.net>

My task. I have unit.h in both repo1 and repo2. I make a symlink from repo1 to repo2 and want such a behaviour: in both repos I want to treat unit.h like normal file, not symlink.

Why to do this though Git has submodules?
1. One of repos may be unrelated, private, corporate…
2. Auxiliary things like unit testing require additional bookkeeping, 
e.g. moving unit testing framework (Google Test etc) to the submodule, 
special directory setup…
3. The repo becomes harder to pick up if you do not have/want Git. With 
submodules, if you do “download ZIP”, you get uncompileable source. Even 
in Linux where Git is out-of-the-box, you do some command-line magic 
before repo starts to work.
4. Submodules are just a “big gun” for library <30k in size.
5. Developing alone does not involve pulling, but with submodules it 
becomes the case.

Men at Git for Windows thought it’s not just a Windows issue and sent me here.

Message 1 of 1 in “Is it possible to treat symlinks just as normal files in Git?”
  1. Mikhail MerkuryevApr 22, 2022

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.