From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kirill Smelkov Subject: Re: [TopGit PATCH] .gitignore += vim swap files Date: Fri, 19 Sep 2008 11:28:51 +0400 Organization: St.Petersburg State University Message-ID: <20080919072851.GD4423@roro3> References: <1221755370-6817-1-git-send-email-kirr@landau.phys.spbu.ru> <1221755370-6817-2-git-send-email-kirr@landau.phys.spbu.ru> <36ca99e90809181038o74c73121j59849b3f24fe6469@mail.gmail.com> <20080919050612.GA4423@roro3> <36ca99e90809190010n40d0a4w26975e87e17a822e@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Kirill Smelkov , Daniel Barkalow , Petr Baudis , Git Mailing List To: Bert Wesarg X-From: git-owner@vger.kernel.org Fri Sep 19 09:38:22 2008 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1KgaZJ-0001WA-Ow for gcvg-git-2@gmane.org; Fri, 19 Sep 2008 09:38:22 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750961AbYISHhN convert rfc822-to-quoted-printable (ORCPT ); Fri, 19 Sep 2008 03:37:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750987AbYISHhN (ORCPT ); Fri, 19 Sep 2008 03:37:13 -0400 Received: from vs281.server4u.cz ([81.91.85.31]:59037 "EHLO vs281.server4u.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750868AbYISHhM (ORCPT ); Fri, 19 Sep 2008 03:37:12 -0400 Received: from localhost ([127.0.0.1] helo=roro3) by vs281.server4u.cz with esmtp (Exim 4.69) (envelope-from ) id 1Kgaek-0000Lr-Er; Fri, 19 Sep 2008 09:43:58 +0200 Received: from kirr by roro3 with local (Exim 4.69) (envelope-from ) id 1KgaQ7-00042E-1S; Fri, 19 Sep 2008 11:28:51 +0400 Content-Disposition: inline In-Reply-To: <36ca99e90809190010n40d0a4w26975e87e17a822e@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Fri, Sep 19, 2008 at 09:10:24AM +0200, Bert Wesarg wrote: > On Fri, Sep 19, 2008 at 07:06, Kirill Smelkov wrote: > > On Thu, Sep 18, 2008 at 03:30:35PM -0400, Daniel Barkalow wrote: > >> On Thu, 18 Sep 2008, Bert Wesarg wrote: > >> > >> > On Thu, Sep 18, 2008 at 18:29, Kirill Smelkov wrote: > >> > > Signed-off-by: Kirill Smelkov > >> > > --- > >> > > .gitignore | 2 ++ > >> > > 1 files changed, 2 insertions(+), 0 deletions(-) > >> > > > >> > > diff --git a/.gitignore b/.gitignore > >> > > index 8868f2d..aa39db4 100644 > >> > > --- a/.gitignore > >> > > +++ b/.gitignore > >> > > @@ -18,3 +18,5 @@ tg-import.txt > >> > > tg-remote > >> > > tg-remote.txt > >> > > tg > >> > > + > >> > > +*.swp > >> > can't you do this in your .git/info/excludes? > >> > >> It's generally better to put a core.excludesfile entry in your > >> ~/.gitconfig pointing to a ignore file with editor temporaries for= the > >> editor(s) you personally use. This will then apply to all git proj= ects you > >> work on. > > > > Yes, this makes sense, thanks. > > > > I've had to add the following to my ~/.gitconfig > > > > [core] > > excludesfile=3D /home/kirr/.gitignore-kirr > > > > > > because it does not work when '~' is used for $HOME > > > > [core] > > excludesfile=3D ~/.gitignore-kirr # does not work > Have you tried: >=20 > [core] > excludesfile =3D .gitignore-kirr > There was a discussion about relative files in config. but I didn't t= ried this. It does not work for me -- it picks ./.gitignore-kirr instead of ~/.gitignore-kirr > Anyway, I think this is the best solution. Don't globber the repos wi= th this. Don't you care more about machines than humans? :) I think when we work on a tree, all the autogenerated files should be ignored. This includes *.o and friends for sure, but since we also use editors, and most people use same editors it makes sense to tune repo t= o be ready to hack on with common setups. And I think this http://git.kernel.org/?p=3Dlinux/kernel/git/torvalds/linux-2.6.git;a=3D= commitdiff;h=3D7088655477b51a5a248fa54190388e1283ba7ebf just justifies my words. --=20 =D0=92=D1=81=D0=B5=D0=B3=D0=BE =D1=85=D0=BE=D1=80=D0=BE=D1=88=D0=B5= =D0=B3=D0=BE, =D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB.