# Re: multiple .gitignore and friends in same workdir possible?

9 messages from 2010-04-23 to 2010-04-23. Participants: Sverre Rabbelier, Konrad Karl, Michael J Gruber.
Thread: https://gitlist.dev/t/23578

## Sverre Rabbelier, 2010-04-23 13:01

Subject: Re: multiple .gitignore and friends in same workdir possible?
Message-ID: <y2kfabb9a1e1004230601zcede9e2ah2db8cb0f082bcbb4@mail.gmail.com>
URL: https://gitlist.dev/e/y2kfabb9a1e1004230601zcede9e2ah2db8cb0f082bcbb4%40mail.gmail.com
In-Reply-To: <4526533254752708319@unknownmsgid>

```
Heya,

On Fri, Apr 23, 2010 at 14:46, Konrad Karl <kk_konrad@gmx.at> wrote:
> Is this currently possible or am I missing something? It would ease
> my task a lot.

I assume that each repo has it's own gitdir, in which case it has it's
own config file, so you could just use "git config core.excludesfile
.gitignore.one"?

-- 
Cheers,

Sverre Rabbelier

```

## Konrad Karl, 2010-04-23 14:32

Subject: Re: multiple .gitignore and friends in same workdir possible?
Message-ID: <7537.06050240925$1272033186@news.gmane.org>
URL: https://gitlist.dev/e/7537.06050240925%241272033186%40news.gmane.org
In-Reply-To: <y2kfabb9a1e1004230601zcede9e2ah2db8cb0f082bcbb4@mail.gmail.com>

```
Hi

On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
> Heya,
> 
> On Fri, Apr 23, 2010 at 14:46, Konrad Karl <kk_konrad@gmx.at> wrote:
> > Is this currently possible or am I missing something? It would ease
> > my task a lot.
> 
> I assume that each repo has it's own gitdir, in which case it has it's
> own config file, so you could just use "git config core.excludesfile
> .gitignore.one"?

yes I could (i confess I was not aware of this config var) but
the fine manual says:

  In _addition_ to .gitignore (per-directory) and .git/info/exclude, 
  git looks into this file for patterns of files which are not meant to be tracked.


so if there was some way to _not_ consider the standard .gitignore &friends
I would be happy to live with.


Greetings,
Konrad

> 
> -- 
> Cheers,
> 
> Sverre Rabbelier

```

## Konrad Karl, 2010-04-23 14:32

Subject: Re: multiple .gitignore and friends in same workdir possible?
Message-ID: <20100423143248.GA6930localhost>
URL: https://gitlist.dev/e/20100423143248.GA6930localhost
In-Reply-To: <y2kfabb9a1e1004230601zcede9e2ah2db8cb0f082bcbb4@mail.gmail.com>

```
Hi

On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
> Heya,
> 
> On Fri, Apr 23, 2010 at 14:46, Konrad Karl <kk_konrad@gmx.at> wrote:
> > Is this currently possible or am I missing something? It would ease
> > my task a lot.
> 
> I assume that each repo has it's own gitdir, in which case it has it's
> own config file, so you could just use "git config core.excludesfile
> .gitignore.one"?

yes I could (i confess I was not aware of this config var) but
the fine manual says:

  In _addition_ to .gitignore (per-directory) and .git/info/exclude, 
  git looks into this file for patterns of files which are not meant to be tracked.


so if there was some way to _not_ consider the standard .gitignore &friends
I would be happy to live with.


Greetings,
Konrad

> 
> -- 
> Cheers,
> 
> Sverre Rabbelier

```

## Michael J Gruber, 2010-04-23 14:50

Subject: Re: multiple .gitignore and friends in same workdir possible?
Message-ID: <4BD1B3AD.50407@drmicha.warpmail.net>
URL: https://gitlist.dev/e/4BD1B3AD.50407%40drmicha.warpmail.net
In-Reply-To: <7537.06050240925$1272033186@news.gmane.org>

```
Konrad Karl venit, vidit, dixit 23.04.2010 16:32:
> Hi
> 
> On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
>> Heya,
>>
>> On Fri, Apr 23, 2010 at 14:46, Konrad Karl <kk_konrad@gmx.at> wrote:
>>> Is this currently possible or am I missing something? It would ease
>>> my task a lot.
>>
>> I assume that each repo has it's own gitdir, in which case it has it's
>> own config file, so you could just use "git config core.excludesfile
>> .gitignore.one"?
> 
> yes I could (i confess I was not aware of this config var) but
> the fine manual says:
> 
>   In _addition_ to .gitignore (per-directory) and .git/info/exclude, 
>   git looks into this file for patterns of files which are not meant to be tracked.
> 
> 
> so if there was some way to _not_ consider the standard .gitignore &friends
> I would be happy to live with.

If you control the creation of the repos, why don't you simply leave the
standard .gitignore empty and use the config as suggested by Sverre?

Michael

```

## Konrad Karl, 2010-04-23 15:03

Subject: Re: multiple .gitignore and friends in same workdir possible?
Message-ID: <16960.9152632349$1272035032@news.gmane.org>
URL: https://gitlist.dev/e/16960.9152632349%241272035032%40news.gmane.org
In-Reply-To: <4BD1B3AD.50407@drmicha.warpmail.net>

```
On Fri, Apr 23, 2010 at 04:50:21PM +0200, Michael J Gruber wrote:
> Konrad Karl venit, vidit, dixit 23.04.2010 16:32:
> > Hi
> > 
> > On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
> >> Heya,
> >>
[ ...... ]
> > so if there was some way to _not_ consider the standard .gitignore &friends
> > I would be happy to live with.
> 
> If you control the creation of the repos, why don't you simply leave the
> standard .gitignore empty and use the config as suggested by Sverre?

Because this information does not getting transfered with git clone.

People have the chance to forget to set this variable after cloning the
source repo and they will. 

Konrad

> 
> Michael
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

```

## Konrad Karl, 2010-04-23 15:03

Subject: Re: multiple .gitignore and friends in same workdir possible?
Message-ID: <20100423150338.GA26487localhost>
URL: https://gitlist.dev/e/20100423150338.GA26487localhost
In-Reply-To: <4BD1B3AD.50407@drmicha.warpmail.net>

```
On Fri, Apr 23, 2010 at 04:50:21PM +0200, Michael J Gruber wrote:
> Konrad Karl venit, vidit, dixit 23.04.2010 16:32:
> > Hi
> > 
> > On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
> >> Heya,
> >>
[ ...... ]
> > so if there was some way to _not_ consider the standard .gitignore &friends
> > I would be happy to live with.
> 
> If you control the creation of the repos, why don't you simply leave the
> standard .gitignore empty and use the config as suggested by Sverre?

Because this information does not getting transfered with git clone.

People have the chance to forget to set this variable after cloning the
source repo and they will. 

Konrad

> 
> Michael
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

```

## Michael J Gruber, 2010-04-23 15:51

Subject: Re: multiple .gitignore and friends in same workdir possible?
Message-ID: <4BD1C1F6.9070908@drmicha.warpmail.net>
URL: https://gitlist.dev/e/4BD1C1F6.9070908%40drmicha.warpmail.net
In-Reply-To: <16960.9152632349$1272035032@news.gmane.org>

```
Konrad Karl venit, vidit, dixit 23.04.2010 17:03:
> On Fri, Apr 23, 2010 at 04:50:21PM +0200, Michael J Gruber wrote:
>> Konrad Karl venit, vidit, dixit 23.04.2010 16:32:
>>> Hi
>>>
>>> On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
>>>> Heya,
>>>>
> [ ...... ]
>>> so if there was some way to _not_ consider the standard .gitignore &friends
>>> I would be happy to live with.
>>
>> If you control the creation of the repos, why don't you simply leave the
>> standard .gitignore empty and use the config as suggested by Sverre?
> 
> Because this information does not getting transfered with git clone.
> 
> People have the chance to forget to set this variable after cloning the
> source repo and they will. 

...and the same is true for setting GIT_DIR appropriately for each repo
- people will commit to the wrong repo, which is even worse. That's why
it's a fragile approach to begin with. Is there no chance you could put
those libs in subdirs and use git modules?

Michael

```

## Konrad Karl, 2010-04-23 18:29

Subject: Re: multiple .gitignore and friends in same workdir possible?
Message-ID: <12580.8595716537$1272047426@news.gmane.org>
URL: https://gitlist.dev/e/12580.8595716537%241272047426%40news.gmane.org
In-Reply-To: <4BD1C1F6.9070908@drmicha.warpmail.net>

```
On Fri, Apr 23, 2010 at 05:51:18PM +0200, Michael J Gruber wrote:
> Konrad Karl venit, vidit, dixit 23.04.2010 17:03:
> > On Fri, Apr 23, 2010 at 04:50:21PM +0200, Michael J Gruber wrote:
> >> Konrad Karl venit, vidit, dixit 23.04.2010 16:32:
> >>> Hi
> >>>
> >>> On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
> .........
> > Because this information does not getting transfered with git clone.
> > 
> > People have the chance to forget to set this variable after cloning the
> > source repo and they will. 
> 
> ...and the same is true for setting GIT_DIR appropriately for each repo
> - people will commit to the wrong repo, which is even worse. That's why
> it's a fragile approach to begin with. Is there no chance you could put
> those libs in subdirs and use git modules?

the chance exists for the future but the existing build system does not
support it (especially for older releases which I would like to be able
to rebuild as is).

I think a script with a prominent name in the  workdir which will set 
the git variable  will be the next convenient solution which we can live with.

thanks for your input,
Konrad

> 
> Michael

```

## Konrad Karl, 2010-04-23 18:29

Subject: Re: multiple .gitignore and friends in same workdir possible?
Message-ID: <20100423182959.GA1178localhost>
URL: https://gitlist.dev/e/20100423182959.GA1178localhost
In-Reply-To: <4BD1C1F6.9070908@drmicha.warpmail.net>

```
On Fri, Apr 23, 2010 at 05:51:18PM +0200, Michael J Gruber wrote:
> Konrad Karl venit, vidit, dixit 23.04.2010 17:03:
> > On Fri, Apr 23, 2010 at 04:50:21PM +0200, Michael J Gruber wrote:
> >> Konrad Karl venit, vidit, dixit 23.04.2010 16:32:
> >>> Hi
> >>>
> >>> On Fri, Apr 23, 2010 at 03:01:42PM +0200, Sverre Rabbelier wrote:
> .........
> > Because this information does not getting transfered with git clone.
> > 
> > People have the chance to forget to set this variable after cloning the
> > source repo and they will. 
> 
> ...and the same is true for setting GIT_DIR appropriately for each repo
> - people will commit to the wrong repo, which is even worse. That's why
> it's a fragile approach to begin with. Is there no chance you could put
> those libs in subdirs and use git modules?

the chance exists for the future but the existing build system does not
support it (especially for older releases which I would like to be able
to rebuild as is).

I think a script with a prominent name in the  workdir which will set 
the git variable  will be the next convenient solution which we can live with.

thanks for your input,
Konrad

> 
> Michael

```
