threads / discuss / 18145

Re: How to ignore a modified file?

Subject: Re: How to ignore a modified file?

## tl;dr

4 messages between Mar 5, 2009 and Mar 5, 2009.

replies: 3people: 3as markdown or json

Quim K Holland· Mar 5, 2009, 08:53 UTC · lore
You can run "git checkout directory".
Show 9 quoted lines
> 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· Mar 5, 2009, 10:09 UTC · re: Quim K Holland · lore
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· Mar 5, 2009, 10:21 UTC · re: Sverre Rabbelier · lore
Sverre Rabbelier <srabbelier@gmail.com> writes:
Show 7 quoted lines
> 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· Mar 5, 2009, 13:58 UTC · re: Junio C Hamano · lore
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

← back to recent threads