All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Packham <judge.packham@gmail.com>
To: Bruce Korb <bruce.korb@gmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: getting git to ignore modifications to specific files
Date: Wed, 01 Sep 2010 13:45:18 -0700	[thread overview]
Message-ID: <4C7EBB5E.5080003@gmail.com> (raw)
In-Reply-To: <AANLkTi=cPzAAKsTR+_1sucF46Rez=yi2Okjz7RhcCZ20@mail.gmail.com>

On 01/09/10 12:12, Bruce Korb wrote:
> On Wed, Sep 1, 2010 at 11:57 AM, Chris Packham <judge.packham@gmail.com> wrote:
>> 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?
> 
> Isn't that what .git/info/exclude is about?

Not as far as I've been able to tell. .gitignore and .git/info/exclude
are ways to tell git to ignore these untracked files so that they don't
show up in the output of git status (and others).

In my case the file is tracked, I just don't care if it changes and I
don't want git rebase/checkout to complain if I have local modifications
to this file. Ideally I'd like git add INSTALL to treat it as if nothing
changed but have git add -f INSTALL stage the changes.

Thinking about what I can do with the existing .gitattributes I could
probably have a custom diff driver that always returns 0 (/bin/true
perhaps) and a custom merge strategy of theirs (or something sensible)
if needed. A clean/smudge filter of git update-index
--assume-(un)changed may also be possible but I haven't tried it yet.

  reply	other threads:[~2010-09-01 20:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-01 18:57 getting git to ignore modifications to specific files Chris Packham
2010-09-01 19:06 ` Joshua Jensen
2010-09-01 19:12 ` Bruce Korb
2010-09-01 20:45   ` Chris Packham [this message]
2010-09-01 19:24 ` Joshua Juran
2010-09-02  4:09 ` Jonathan Nieder
2010-09-02  9:25 ` Jan Krüger
2010-09-02 10:20 ` Michael J Gruber
2010-09-02 19:40   ` Chris Packham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C7EBB5E.5080003@gmail.com \
    --to=judge.packham@gmail.com \
    --cc=bruce.korb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.