# GIT_DIR/--git-dir question

3 messages from 2007-11-08 to 2007-11-08. Participants: Joakim Tjernlund, Junio C Hamano.
Thread: https://gitlist.dev/t/10739

## Joakim Tjernlund, 2007-11-08 19:06

Subject: GIT_DIR/--git-dir question
Message-ID: <007c01c8223a$6af2e550$5267a8c0@Jocke>
URL: https://gitlist.dev/e/007c01c8223a%246af2e550%245267a8c0%40Jocke

```
I just started to look at having multiple work trees, each working on a separate branch,
using the same git repo.

GIT_DIR/--git-dir seems to be what I am looking for but I wonder if there
is a way to store the value of GIT_DIR/--git-dir in the working tree
somehow?

  Jocke

```

## Junio C Hamano, 2007-11-08 22:00

Subject: Re: GIT_DIR/--git-dir question
Message-ID: <7vfxzg1jpb.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vfxzg1jpb.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <007c01c8223a$6af2e550$5267a8c0@Jocke>

```
"Joakim Tjernlund" <joakim.tjernlund@transmode.se> writes:

> I just started to look at having multiple work trees, each working on a separate branch,
> using the same git repo.

I suspect contrib/workdir is what you are looking for not
GIT_DIR.

```

## Joakim Tjernlund, 2007-11-08 23:24

Subject: RE: GIT_DIR/--git-dir question
Message-ID: <008701c8225e$90f38dd0$5267a8c0@Jocke>
URL: https://gitlist.dev/e/008701c8225e%2490f38dd0%245267a8c0%40Jocke
In-Reply-To: <7vfxzg1jpb.fsf@gitster.siamese.dyndns.org>

```
> From: Junio C Hamano [mailto:gitster@pobox.com] 
> Sent: den 8 november 2007 23:01
> To: Joakim Tjernlund
> Cc: git@vger.kernel.org
> Subject: Re: GIT_DIR/--git-dir question
> 
> "Joakim Tjernlund" <joakim.tjernlund@transmode.se> writes:
> 
> > I just started to look at having multiple work trees, each 
> working on a separate branch,
> > using the same git repo.
> 
> I suspect contrib/workdir is what you are looking for not
> GIT_DIR.

Yes, it does look like what I am looking for. But now I am 
a bit confused as to what GIT_DIR/--git-dir is supposed to be
used for.

 Jocke

```
