# about directory management

3 messages from 2011-07-19 to 2011-07-19. Participants: J. Bakshi, Chris Packham.
Thread: https://gitlist.dev/t/27850

## J. Bakshi, 2011-07-19 06:07

Subject: about directory management
Message-ID: <20110719113706.0aca61b5@shiva.selfip.org>
URL: https://gitlist.dev/e/20110719113706.0aca61b5%40shiva.selfip.org

```
Hello,

I need to add directory structure in my git repo where some of the directory are empty but still need to add those to maintain the structure. I also need to add directory as non-recursive, so that I can add the final child directory so get the structure. How can git help to do these ?

Thanks

```

## Chris Packham, 2011-07-19 07:45

Subject: Re: about directory management
Message-ID: <4E253603.7020403@gmail.com>
URL: https://gitlist.dev/e/4E253603.7020403%40gmail.com
In-Reply-To: <20110719113706.0aca61b5@shiva.selfip.org>

```
On 19/07/11 18:07, J. Bakshi wrote:
> Hello,
> 
> I need to add directory structure in my git repo where some of the directory are empty but still need to add those to maintain the structure. I also need to add directory as non-recursive, so that I can add the final child directory so get the structure. How can git help to do these ?
> 
> Thanks
> --

One of the things that makes git different from other SCMs is that it
tracks sets of changes (i.e. commits) not individual files/directories.
My initial response is to tell you to create the directories when you've
got something to put into them and not before. If they are needed for
compilation of your code then make it part of the build process. If you
do have a reason for needing empty directories the standard response is
to put a .dummy file in the directory (you only need it in the deepest
directory, not every directory on the path).

```

## J. Bakshi, 2011-07-19 07:53

Subject: Re: about directory management
Message-ID: <20110719132333.1713c52b@shiva.selfip.org>
URL: https://gitlist.dev/e/20110719132333.1713c52b%40shiva.selfip.org
In-Reply-To: <4E253603.7020403@gmail.com>

```
On Tue, 19 Jul 2011 19:45:07 +1200
Chris Packham <judge.packham@gmail.com> wrote:

> On 19/07/11 18:07, J. Bakshi wrote:
> > Hello,
> > 
> > I need to add directory structure in my git repo where some of the directory are empty but still need to add those to maintain the structure. I also need to add directory as non-recursive, so that I can add the final child directory so get the structure. How can git help to do these ?
> > 
> > Thanks
> > --
> 
> One of the things that makes git different from other SCMs is that it
> tracks sets of changes (i.e. commits) not individual files/directories.
> My initial response is to tell you to create the directories when you've
> got something to put into them and not before. If they are needed for
> compilation of your code then make it part of the build process. If you
> do have a reason for needing empty directories the standard response is
> to put a .dummy file in the directory (you only need it in the deepest
> directory, not every directory on the path).
> 
> 

Thanks for your valuable clarification and notes.

```
