# Re: How to ignore a modified file?

4 messages from 2009-03-05 to 2009-03-05. Participants: Quim K Holland, Sverre Rabbelier, Junio C Hamano.
Thread: https://gitlist.dev/t/18145

## Quim K Holland, 2009-03-05 08:53

Subject: Re: How to ignore a modified file?
Message-ID: <20090305145308.6117@qkholland.gmail.com>
URL: https://gitlist.dev/e/20090305145308.6117%40qkholland.gmail.com

```
You can run "git checkout directory".

> Hi, 
>   I run "git status", and I saw the a modified file in a directory.  I want
> to ignore all files in that directory.  I put the directory name into
> .gitignore, but it still shows as modified file.  Why?  How do I ignore the
> directory?
> Thanks.
> -- 
> View this message in context: http://n2.nabble.com/How-to-ignore-a-modified-file--tp2428157p2428157.html
> Sent from the git mailing list archive at Nabble.com.

```

## Sverre Rabbelier, 2009-03-05 10:09

Subject: Re: How to ignore a modified file?
Message-ID: <fabb9a1e0903050209i1e70c8b3n69d7ade9e382b617@mail.gmail.com>
URL: https://gitlist.dev/e/fabb9a1e0903050209i1e70c8b3n69d7ade9e382b617%40mail.gmail.com
In-Reply-To: <20090305145308.6117@qkholland.gmail.com>

```
Heya,

On Thu, Mar 5, 2009 at 09:53, Quim K Holland <qkholland@gmail.com> wrote:
> You can run "git checkout directory".

Yes, but that would destroy his changes, I do not get the impression
that that's what he wants...

-- 
Cheers,

Sverre Rabbelier

```

## Junio C Hamano, 2009-03-05 10:21

Subject: Re: How to ignore a modified file?
Message-ID: <7v4oy82rt4.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v4oy82rt4.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <fabb9a1e0903050209i1e70c8b3n69d7ade9e382b617@mail.gmail.com>

```
Sverre Rabbelier <srabbelier@gmail.com> writes:

> Heya,
>
> On Thu, Mar 5, 2009 at 09:53, Quim K Holland <qkholland@gmail.com> wrote:
>> You can run "git checkout directory".
>
> Yes, but that would destroy his changes, I do not get the impression
> that that's what he wants...

Actually, I thought the advises from you two were both horrible without
first qualifying the answers nor asking what was really wanted.

Yours didn't *ignore* changes, but staged (and would result in a later
commit) a different change to these paths, namely removal of them.

"I have these changes but I want to ignore" may mean "I didn't mean to
change them and do not care about them." and "checkout" may be the right
thing to use if that is the case.

```

## Sverre Rabbelier, 2009-03-05 13:58

Subject: Re: How to ignore a modified file?
Message-ID: <fabb9a1e0903050558q311f0a7fy50a5c29fa86067ca@mail.gmail.com>
URL: https://gitlist.dev/e/fabb9a1e0903050558q311f0a7fy50a5c29fa86067ca%40mail.gmail.com
In-Reply-To: <7v4oy82rt4.fsf@gitster.siamese.dyndns.org>

```
Heya,

On Thu, Mar 5, 2009 at 11:21, Junio C Hamano <gitster@pobox.com> wrote:
> Yours didn't *ignore* changes, but staged (and would result in a later
> commit) a different change to these paths, namely removal of them.

You are of course right, thank you for pointing it out.

-- 
Cheers,

Sverre Rabbelier

```
