From: Junio C Hamano Date: Sun, 20 Apr 2014 22:13:57 GMT Subject: Re: the ".git" folder Message-ID: <7v38h7lkd6.fsf@alter.siamese.dyndns.org> In-Reply-To: Duy Nguyen writes: > On Sun, Apr 20, 2014 at 4:13 PM, Miller, Hugh wrote: >> Dear Community, >> >> Is there any way to use .git (e.g., a different set of "client" commands) that allows the .git folder to be placed in a location away from the actual files being versioned ? For example, can one set environment variables that let the software know where the .git folder is ? > > Try > > git --git-dir= --work-tree= > > > The reason of two arguments instead of one is because .git is also > used to mark top work tree location, which is now lost after you move > .git elsewhere. You could also set environment variables GIT_DIR and > GIT_WORK_TREE, which have the same effect. "man git" for details. Depending on the true reason why such a split layout is desired, the answer might be the textual .git (aka "gitfile: there") that is used by the submodule folks via "clone --separate-git-dir".