Re: I don't want the .git directory next to my code.
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 16, 2008, 12:45 UTC
- Message-ID
- <alpine.LSU.1.00.0801161244390.17650@racer.site>
- In-Reply-To
- <vpq4pderm7k.fsf@bauges.imag.fr>
Hi,
On Wed, 16 Jan 2008, Matthieu Moy wrote:
Show 32 quoted lines
> Bill Lear <rael@zopyra.com> writes: > > > On Wednesday, January 16, 2008 at 10:36:34 (+0000) Johannes Schindelin writes: > >>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): > > Yes, so you can use > > $ git --work-tree . --git-dir /some/other/place <some-command> > > But it's far from the user-friendlyness of a real lightweight checkout: > you need to provide the --work-tree and --git-dir options each time you > run git. And making an alias or using the environment variables are not > really an option if you have more than one repository or working tree to > deal with.
Well, the OP said he did not want _any_ file in the worktree. So there's no way around specifying by hand everytime where the git directory should be.
I'm not saying I find the OP's restrictions sensible, but that's what he said.
Ciao, Dscho