# adding files in .git?

3 messages from 2009-03-16 to 2009-03-16. Participants: E R, Shawn O. Pearce, Matthieu Moy.
Thread: https://gitlist.dev/t/18324

## E R, 2009-03-16 15:14

Subject: adding files in .git?
Message-ID: <3a69fa7c0903160814u42fbb461qf03a37176546357d@mail.gmail.com>
URL: https://gitlist.dev/e/3a69fa7c0903160814u42fbb461qf03a37176546357d%40mail.gmail.com

```
I'd like to add a "short description" attribute to my .git repository.
This would be used by my bash prompt setting function in creating the
PS1 string. How would you recommend that this be implemented?

My ideas are:

1) Use another file in .git similar to the "description" file (such as
.git/short-description)
2) Use a setting in the .git/config file.

Any comments on the advantages/disadvantages of these approaches? Or
is there yet another better way?

Thanks,

ER

```

## Shawn O. Pearce, 2009-03-16 15:18

Subject: Re: adding files in .git?
Message-ID: <20090316151823.GP22920@spearce.org>
URL: https://gitlist.dev/e/20090316151823.GP22920%40spearce.org
In-Reply-To: <3a69fa7c0903160814u42fbb461qf03a37176546357d@mail.gmail.com>

```
E R <pc88mxer@gmail.com> wrote:
> I'd like to add a "short description" attribute to my .git repository.
> This would be used by my bash prompt setting function in creating the
> PS1 string. How would you recommend that this be implemented?
> 
> My ideas are:
> 
> 1) Use another file in .git similar to the "description" file (such as
> .git/short-description)
> 2) Use a setting in the .git/config file.
> 
> Any comments on the advantages/disadvantages of these approaches? Or
> is there yet another better way?

Using another file may be faster to execute as you can probably
read the file directly in shell, vs. needing to fork to read the
file with `git config`.

But there really isn't a huge argument either way other than that.

-- 
Shawn.

```

## Matthieu Moy, 2009-03-16 16:56

Subject: Re: adding files in .git?
Message-ID: <vpqr60x76f3.fsf@bauges.imag.fr>
URL: https://gitlist.dev/e/vpqr60x76f3.fsf%40bauges.imag.fr
In-Reply-To: <3a69fa7c0903160814u42fbb461qf03a37176546357d@mail.gmail.com>

```
E R <pc88mxer@gmail.com> writes:

> 1) Use another file in .git similar to the "description" file (such as
> .git/short-description)
> 2) Use a setting in the .git/config file.
>
> Any comments on the advantages/disadvantages of these approaches?

Neither of them will propagate through clone. Depending on your
use-case, this is an advantage or not.

-- 
Matthieu

```
