top | item 37016768

(no title)

tynorf | 2 years ago

FWIW, local git clones use hard links for object files, so share a lot of their data.

https://www.git-scm.com/docs/git-clone#Documentation/git-clo...

discuss

order

anyfoo|2 years ago

Yeah, but if you work with a central repository, when using local git clones the clones are hanging off the local repository, not the central one.

Sure, you can change back origin to point to the central one again, but you still have to do a dance to sync branches among your local clones (and I’m not sure what happens to the hardlinks).

worktrees just naturally basically are “views” of the same local repository, which may hang off a central repository (or not).

tynorf|2 years ago

Yes, that would be a different reason to prefer worktrees (that I mostly agree with). I was responding to the specific storage space claim.