On Thu, 8 Nov 2012 02:04:06 -0800 (PST)
John Smith <csos...@gmail.com> wrote:
> Some documents write about the .git file, for example
> git clone \\[repository server name]\[share name]\example.git
> However I have no .git file in my bare repo.
Non-bare (that is, "regular") repositories usually[*] are organized
like this: the directory said to be a repository is in fact the
repository's work tree, and inside this directory there is another
directory, named ".git", which actually stores the Git stuff.
A bare repository does not have a work tree attached to it, so its
directory just contains what ".git" subdirectory contains in a regular
To put it even more simple: you can take a non-bare repo, copy the
".git" subdirectory from it somewhere and use the resulting directory
as a bare repo.
Appending the ".git" suffix to the names of bare repos is just a
convention to give a hint to the onlooker that the repository is bare.
If you'll think about this a bit, you'll see a pattern: for a regular
repo named "example", you'd have a directory structure:
If you rip out the ".git" subdirectory from it to make a bare repo,
you'll logically want to prepend a meaningful name to it producing, for
[*] In fact this might get more involved than that as you are able to
have the Git data directory in some other place, not inside the work
tree, but it's safe to ignore these details for now.