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

How does git deal with hard links in source code?

From
SKSeth Kriticos <seth.kriticos@googlemail.com>
Date
Aug 23, 2010, 08:33 UTC
Message-ID
<AANLkTik3858Kf6MSPALeNYrE6L=ixf=0s028+_ie_SW_@mail.gmail.com>
Hi list,

I've got a question my google-fu and the docs were not able to answer:

Is there a way to preserve the hard links that are within a git repository checkout (the stuff that is tracked by the git repository)?

The use-case I have is the following: I want to have two different template directories for stuff in the tracked sources: a base one and some extended ones. I want to have the stuff from the base one hard-linked to the extended one, so changes in the base one change all the other depending templates too.

Now for testing I committed and pushed an instance of this and then cloned the repository, and it ate my hard links (checked out two separate copies of the files).

Is there a way to convince git not to eat my hard links without some complicated scripting magic and checkout hooks?

~ Seth Kriticos
Next: Jakub Narebski
Message 1 of 2 in “How does git deal with hard links in source code?”
  1. Seth KriticosAug 23, 2010
  2. Jakub NarebskiAug 23, 2010

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.