On Thu, Oct 26, 2017 at 07:51:24PM -0400, [email protected] wrote: >> The ".git" sub-directory that stores the whole repository is normally a >> hidden directory (as are most directories with a name starting with a >> dot). You can make windows explorer show them by setting an option. --
> It may be helpful to add that the (hidden) .git directory is a subdirectory > of > the project directory. (Which seems to be true in my experience--maybe > that's > not always the case?) Two things, if we're digging deeper. First, as was already mentioned in the first reply to this thread, Git repositories come in two flavours: "normal" (or "regular", if you want — in fact, they do not have any special name in Git documentation) and "bare". Both kinds of repositories contain the object store — a directory where all the history and branches and tags, — that is, all the stuff — are stored, as well as the per-repository configuration. What makes these types of repositories different, is the presence of absence of the so-called "work tree": a directory, where the files of the currently checked out history revision are stored. The user edits these files, and that's those files they add using `git add` etc. The repositories with the work tree are "normal", the ones without the work tree are "bare". Since the directory containing a normal repository *is* its work tree, there has to be a place where the repository's object store and configuration reside. For this, normal Git repositories normally use the subdirectory named ".git" right in the work tree. In a way, a normal repository is a work tree plus a bare repository in a subdirectory of the work tree. While modifying the history of a bare repository — such as recodring new commits — is possible, it's inconvenient; that's why bare repositories are mostly used as "rendez-vous" or "public" or "shared" repositories — places where everyone push to and fetch from, and are kept on servers. "Normal" repositories are what developers are working with on their workstations. Second, Git has several ways to be configured, and the location of the object store (what's kept in ".git" normally) can be configured. So yes, it's possible to have a work tree without any ".git" subdirectory but that's a very unusual case; typically if you face one, you know what and why you're doing ;-) -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
