# Reuse .git directory.

3 messages from 2010-03-25 to 2010-03-25. Participants: Mahesh Vaidya, Ramkumar Ramachandra, Junio C Hamano.
Thread: https://gitlist.dev/t/23177

## Mahesh Vaidya, 2010-03-25 17:50

Subject: Reuse .git directory.
Message-ID: <10467746.91269539410487.JavaMail.mvaidya@mvaidya-desktop>
URL: https://gitlist.dev/e/10467746.91269539410487.JavaMail.mvaidya%40mvaidya-desktop

```
Reuse .git directory.

I would like work 4 different branch simultaneously viz.

master, feature, bugfix, expt but would like to use same same GIT_DIR. Is this possible ? so that I can save some space ?

I have tried following 
* git clone /path/to/repos
* export GIT_DIR=/path/to/repos/.git
* mkdir ~/feature
* git checkout -b feature master

This step misses the files. Please advise me if such an approach is correct ?


Thx

Mahesh

```

## Ramkumar Ramachandra, 2010-03-25 17:58

Subject: Re: Reuse .git directory.
Message-ID: <f3271551003251058y45a37ea2n9867fc1abbb50a07@mail.gmail.com>
URL: https://gitlist.dev/e/f3271551003251058y45a37ea2n9867fc1abbb50a07%40mail.gmail.com
In-Reply-To: <10467746.91269539410487.JavaMail.mvaidya@mvaidya-desktop>

```
Hi,

> I would like work 4 different branch simultaneously viz.
> master, feature, bugfix, expt but would like to use same same GIT_DIR. Is this possible ? so that I can save some space ?

All Git branches *are* contained in the same GIT_DIR. I'm not sure
what your question is, but I suspect you don't understand how
branching works in Git. Please read up some introductory material on
this.

-- Ram

```

## Junio C Hamano, 2010-03-25 19:24

Subject: Re: Reuse .git directory.
Message-ID: <7vfx3oxkzd.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vfx3oxkzd.fsf%40alter.siamese.dyndns.org
In-Reply-To: <10467746.91269539410487.JavaMail.mvaidya@mvaidya-desktop>

```
git-new-worktree, perhaps?

```
