From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael J Gruber Subject: Re: getting git to ignore modifications to specific files Date: Thu, 02 Sep 2010 12:20:07 +0200 Message-ID: <4C7F7A57.4030504@drmicha.warpmail.net> References: <4C7EA1FF.8030307@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "git@vger.kernel.org" To: Chris Packham X-From: git-owner@vger.kernel.org Thu Sep 02 12:20:15 2010 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Or6tz-00007n-DZ for gcvg-git-2@lo.gmane.org; Thu, 02 Sep 2010 12:20:15 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752658Ab0IBKUG (ORCPT ); Thu, 2 Sep 2010 06:20:06 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:58116 "EHLO out1.smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752092Ab0IBKUE (ORCPT ); Thu, 2 Sep 2010 06:20:04 -0400 Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id C07A930A; Thu, 2 Sep 2010 06:20:03 -0400 (EDT) Received: from frontend1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Thu, 02 Sep 2010 06:20:03 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=cBzS2pEm7KtYIarQEJ6cw+1PuX4=; b=TMQ4I96EKc6sICxyyCvAFPpajCRIVjhZDBe9jMu6d1nGb4mwCpLgQLfpL9xMTPJXvLnf7JA50sN4jP7CrInWKmWlt/CV3soTacNz5gV9KYoN1zuqZmlHqKpDmf3IhO3fXFFHo/lRzHffBMf840PiL8HNalFbypY7rphgjdMN+l0= X-Sasl-enc: nprdDKToYrWPQSHR+Hk+IwGxk1QcKi70Z6MWcLH4TwdO 1283422803 Received: from localhost.localdomain (heawood.math.tu-clausthal.de [139.174.44.4]) by mail.messagingengine.com (Postfix) with ESMTPSA id 457E94074FA; Thu, 2 Sep 2010 06:20:03 -0400 (EDT) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Lightning/1.0b2pre Thunderbird/3.1.2 In-Reply-To: <4C7EA1FF.8030307@gmail.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Chris Packham venit, vidit, dixit 01.09.2010 20:57: > Hi, > > We have a git repository that as some GNU build system (a.k.a. > autotools) files, my current problem is with the INSTALL file but I > suspect there may be some others. These can get modified if you are > running a different version of autotools from when the files were created. > > I've had various arguments about which autotools files should or > shouldn't be included in our repositories. My general rule of thumb is > that if it is automatically generated then it shouldn't go into the > repository. > > There are a couple of repositories that are local clones of 3rd party > repositories which have included the pesky auto-generated files so whle > I can remove the offending files from repositories we control I need > another solution for the 3rd part ones. > > I did a bit of googling and found > git update-index --assume-unchanged > > Which works locally to stop git status from complaining. Is there anyway > for me to make a change to our clone (a .gitattribues entry?) so that > everyone can get this by default? For tracking my git configuration including .gitk, I used [filter "dotgitk"] clean = fgrep -v geometry together with an appropriate attribute for gitk. I don't know how your autogenerated files differ, but maybe you can set up a filter (or custom diff driver) which makes git think the files are equal though they are not, just like in my case (ignoring window geometry changes for gitk). Michael