# [PATCH] Adds *~ to the .gitignore

6 messages from 2016-06-16 to 2016-06-16. Participants: Lars Vogel, Junio C Hamano, Jeff King.
Thread: https://gitlist.dev/t/42568

## Lars Vogel, 2016-06-09 21:10

Subject: [PATCH] Adds *~ to the .gitignore
Message-ID: <1465506629-16577-1-git-send-email-Lars.Vogel@vogella.com>
URL: https://gitlist.dev/e/1465506629-16577-1-git-send-email-Lars.Vogel%40vogella.com

```
This helps contributors (like me) using editors which automatically create ~ copies of the changed data

Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 05cb58a..13c7403 100644
--- a/.gitignore
+++ b/.gitignore
@@ -219,3 +219,4 @@
 *.pdb
 /Debug/
 /Release/
+*~
-- 
2.8.1

```

## Junio C Hamano, 2016-06-09 21:21

Subject: Re: [PATCH] Adds *~ to the .gitignore
Message-ID: <xmqqh9d2girw.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqh9d2girw.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <1465506629-16577-1-git-send-email-Lars.Vogel@vogella.com>

```
Lars Vogel <lars.vogel@gmail.com> writes:

> This helps contributors (like me) using editors which automatically create ~ copies of the changed data
>
> Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
> ---

We deliberately left this out and kept it out of .gitignore for the
past 10 years.  The justification was that use of Emacs is merely a
personal choice that is better served by .git/info/excludes; we do
not add .swp for vim users, either, for the same reason.

I personally do not care too deeply either way; I could even support
a move to add some selected small file extensions, as long as we
some (social) mechanism to avoid churning this file every time
somebody new comes and complains their favourite editor or other
tools are not supported.



>  .gitignore | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/.gitignore b/.gitignore
> index 05cb58a..13c7403 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -219,3 +219,4 @@
>  *.pdb
>  /Debug/
>  /Release/
> +*~

```

## Jeff King, 2016-06-09 21:38

Subject: Re: [PATCH] Adds *~ to the .gitignore
Message-ID: <20160609213809.GA23059@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20160609213809.GA23059%40sigill.intra.peff.net
In-Reply-To: <xmqqh9d2girw.fsf@gitster.mtv.corp.google.com>

```
On Thu, Jun 09, 2016 at 02:21:55PM -0700, Junio C Hamano wrote:

> Lars Vogel <lars.vogel@gmail.com> writes:
> 
> > This helps contributors (like me) using editors which automatically create ~ copies of the changed data
> >
> > Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
> > ---
> 
> We deliberately left this out and kept it out of .gitignore for the
> past 10 years.  The justification was that use of Emacs is merely a
> personal choice that is better served by .git/info/excludes; we do
> not add .swp for vim users, either, for the same reason.

I think a better choice than .git/info/excludes these days is
~/.config/git/ignore. Then it is associated with the user, not the
project (which seems a better fit, since it is the user who is picking
the editor; this should apply across all projects).

-Peff

```

## Junio C Hamano, 2016-06-09 22:48

Subject: Re: [PATCH] Adds *~ to the .gitignore
Message-ID: <xmqqd1nqges3.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqd1nqges3.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <20160609213809.GA23059@sigill.intra.peff.net>

```
Jeff King <peff@peff.net> writes:

> On Thu, Jun 09, 2016 at 02:21:55PM -0700, Junio C Hamano wrote:
>
>> Lars Vogel <lars.vogel@gmail.com> writes:
>> 
>> > This helps contributors (like me) using editors which automatically create ~ copies of the changed data
>> >
>> > Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
>> > ---
>> 
>> We deliberately left this out and kept it out of .gitignore for the
>> past 10 years.  The justification was that use of Emacs is merely a
>> personal choice that is better served by .git/info/excludes; we do
>> not add .swp for vim users, either, for the same reason.
>
> I think a better choice than .git/info/excludes these days is
> ~/.config/git/ignore. Then it is associated with the user, not the
> project (which seems a better fit, since it is the user who is picking
> the editor; this should apply across all projects).

Yes, that is a better alternative you can use these days, of course.

Thanks.

As I said, however, I could support a move to add some selected
small number of common file extensions, as long as we have some
(social) mechanism to avoid churning this file every time somebody
new comes and complains their favourite editor or other tools are
not supported.

```

## Jeff King, 2016-06-09 23:31

Subject: Re: [PATCH] Adds *~ to the .gitignore
Message-ID: <20160609233118.GA25709@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20160609233118.GA25709%40sigill.intra.peff.net
In-Reply-To: <xmqqd1nqges3.fsf@gitster.mtv.corp.google.com>

```
On Thu, Jun 09, 2016 at 03:48:12PM -0700, Junio C Hamano wrote:

> As I said, however, I could support a move to add some selected
> small number of common file extensions, as long as we have some
> (social) mechanism to avoid churning this file every time somebody
> new comes and complains their favourite editor or other tools are
> not supported.

Yeah, I don't mind it either, myself, provided we avoid the churn.

OTOH, wouldn't somebody who cared about this want it for all of their
projects? I guess I just don't see the point in making this a
git-specific thing.

-Peff

```

## Junio C Hamano, 2016-06-10 15:52

Subject: Re: [PATCH] Adds *~ to the .gitignore
Message-ID: <xmqq4m91ghxx.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqq4m91ghxx.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <20160609233118.GA25709@sigill.intra.peff.net>

```
Jeff King <peff@peff.net> writes:

> On Thu, Jun 09, 2016 at 03:48:12PM -0700, Junio C Hamano wrote:
>
>> As I said, however, I could support a move to add some selected
>> small number of common file extensions, as long as we have some
>> (social) mechanism to avoid churning this file every time somebody
>> new comes and complains their favourite editor or other tools are
>> not supported.
>
> Yeah, I don't mind it either, myself, provided we avoid the churn.
>
> OTOH, wouldn't somebody who cared about this want it for all of their
> projects? I guess I just don't see the point in making this a
> git-specific thing.

My version was "it is your personal preference, why should we cater
to it while we know we cannot do the same for everybody else who has
different preference?"

Your version is a lot more positive, while leading to the same
conclusion.  "It is your personal preference.  Even if we added it
ourselves, it would not help you with other projects".

As usual, you are more brilliant than I am here.

```
