I'm currently reading the book Version Control with Git, by Jon Loeliger.
It talks about the 2 subtle differences between hardlinks and the file://
:
As you have seen, the simplest form of Git URL refers to a repository on a local file- system, be it a true physical filesystem or a virtual filesystem mounted locally via the Network File System (NFS). There are two permutations:
/path/to/repo.git
file:///path/to/repo.git
Although these two formats are essentially identical, there is a subtle but important distinction between the two. The former uses hard links within the filesystem to directly share exactly the same objects between the current and remote repository; the latter copies the objects instead of sharing them directly. To avoid issues associated with shared repositories, the
file://
form is recommended.
At first, I did think that my cloned repo ./git/object
folder was a link to the remote .git/object
, but I guess it's not.
Can someone explain this?