{"thread":{"id":"24832","subject":"How does git deal with hard links in source code?","startedAt":"2010-08-23T08:33:38Z","lastAt":"2010-08-23T09:00:56Z","messageCount":2,"participants":["Seth Kriticos","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"148733","messageId":"AANLkTik3858Kf6MSPALeNYrE6L=ixf=0s028+_ie_SW_@mail.gmail.com","threadId":"24832","inReplyTo":null,"subject":"How does git deal with hard links in source code?","fromName":"Seth Kriticos","fromEmail":"seth.kriticos@googlemail.com","sentAt":"2010-08-23T08:33:38Z","receivedAt":"2010-08-23T08:33:38Z","isPatch":false,"sender":{"key":"seth.kriticos@googlemail.com","avatar":null},"body":"Hi list,\n\nI've got a question my google-fu and the docs were not able\nto answer:\n\nIs there a way to preserve the hard links that are within\na git repository checkout (the stuff that is tracked by the\ngit repository)?\n\nThe use-case I have is the following: I want to have two\ndifferent template directories for stuff in the tracked\nsources: a base one and some extended ones. I want to have\nthe stuff from the base one hard-linked to the extended one,\nso changes in the base one change all the other depending\ntemplates too.\n\nNow for testing I committed and pushed an instance of this\nand then cloned the repository, and it ate my hard links\n(checked out two separate copies of the files).\n\nIs there a way to convince git not to eat my hard links\nwithout some complicated scripting magic and checkout hooks?\n\n~ Seth Kriticos\n"},{"id":"148735","messageId":"m3fwy5og9p.fsf@localhost.localdomain","threadId":"24832","inReplyTo":"AANLkTik3858Kf6MSPALeNYrE6L=ixf=0s028+_ie_SW_@mail.gmail.com","subject":"Re: How does git deal with hard links in source code?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-08-23T09:00:56Z","receivedAt":"2010-08-23T09:00:56Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Seth Kriticos <seth.kriticos@googlemail.com> writes:\n\n> I've got a question my google-fu and the docs were not able\n> to answer:\n> \n> Is there a way to preserve the hard links that are within\n> a git repository checkout (the stuff that is tracked by the\n> git repository)?\n\nNo, there isn't, and there shouldn't.  Not all filesystems support\nhardlinks.\n \n> The use-case I have is the following: I want to have two\n> different template directories for stuff in the tracked\n> sources: a base one and some extended ones. I want to have\n> the stuff from the base one hard-linked to the extended one,\n> so changes in the base one change all the other depending\n> templates too.\n> \n> Now for testing I committed and pushed an instance of this\n> and then cloned the repository, and it ate my hard links\n> (checked out two separate copies of the files).\n> \n> Is there a way to convince git not to eat my hard links\n> without some complicated scripting magic and checkout hooks?\n\nMake hardlinks on deploy.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"}]}