Re: I don't want the .git directory next to my code.
- From
Bill Lear <rael@zopyra.com>
- Date
- Jan 16, 2008, 11:41 UTC
- Message-ID
- <18317.60797.644829.539598@lisa.zopyra.com>
- In-Reply-To
- <alpine.LSU.1.00.0801161035380.17650@racer.site>
On Wednesday, January 16, 2008 at 10:36:34 (+0000) Johannes Schindelin writes:
Show 14 quoted lines
>Hi, > >On Wed, 16 Jan 2008, Matthieu Moy wrote: > >> Mike <fromlists@talkingspider.com> writes: >> >> > I'm learning git and I'm really annoyed that the .git directory lives >> > in the same directory as my code. I don't want it there for three >> > reasons: >> >> The idea was discussed here, mostly under the name "gitlink". > >It goes by "git worktree"; has nothing to do with gitlink (which has >something to do with submodules).
I think you mean to say there is a variable 'worktree' variable available via the config variable 'core.worktree' or environment variable GIT_WORK_TREE, or command-line option --work-tree that should do the trick (no 'git worktree' command exists as far as I can see):
% man git-config
[...]
core.worktree
Set the path to the working tree. The value will not be used in
combination with repositories found automatically in a .git
directory (i.e. $GIT_DIR is not set). This can be overriden by the
GIT_WORK_TREE environment variable and the --work-tree command line
option.
[...]% man git
[...]
--work-tree=<path>
Set the path to the working tree. The value will not be used in
combination with repositories found automatically in a .git
directory (i.e. $GIT_DIR is not set). This can also be controlled
by setting the GIT_WORK_TREE environment variable and the
core.worktree configuration variable.
[...]Bill