* Re: How to ignore a modified file?
@ 2009-03-05 8:53 Quim K Holland
2009-03-05 10:09 ` Sverre Rabbelier
0 siblings, 1 reply; 7+ messages in thread
From: Quim K Holland @ 2009-03-05 8:53 UTC (permalink / raw)
To: dealmaker; +Cc: git
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to ignore a modified file?
2009-03-05 8:53 How to ignore a modified file? Quim K Holland
@ 2009-03-05 10:09 ` Sverre Rabbelier
2009-03-05 10:21 ` Junio C Hamano
0 siblings, 1 reply; 7+ messages in thread
From: Sverre Rabbelier @ 2009-03-05 10:09 UTC (permalink / raw)
To: Quim K Holland; +Cc: dealmaker, git
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to ignore a modified file?
2009-03-05 10:09 ` Sverre Rabbelier
@ 2009-03-05 10:21 ` Junio C Hamano
2009-03-05 13:58 ` Sverre Rabbelier
0 siblings, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2009-03-05 10:21 UTC (permalink / raw)
To: Sverre Rabbelier; +Cc: Quim K Holland, dealmaker, git
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to ignore a modified file?
2009-03-05 10:21 ` Junio C Hamano
@ 2009-03-05 13:58 ` Sverre Rabbelier
0 siblings, 0 replies; 7+ messages in thread
From: Sverre Rabbelier @ 2009-03-05 13:58 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Quim K Holland, dealmaker, git
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* How to ignore a modified file?
@ 2009-03-05 8:44 dealmaker
2009-03-05 8:50 ` Sverre Rabbelier
2009-03-05 20:45 ` Robin Rosenberg
0 siblings, 2 replies; 7+ messages in thread
From: dealmaker @ 2009-03-05 8:44 UTC (permalink / raw)
To: git
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to ignore a modified file?
2009-03-05 8:44 dealmaker
@ 2009-03-05 8:50 ` Sverre Rabbelier
2009-03-05 20:45 ` Robin Rosenberg
1 sibling, 0 replies; 7+ messages in thread
From: Sverre Rabbelier @ 2009-03-05 8:50 UTC (permalink / raw)
To: dealmaker; +Cc: git
Heya,
On Thu, Mar 5, 2009 at 09:44, dealmaker <vinkhc@gmail.com> wrote:
> [...] How do I ignore [a tracked] directory?
$ git rm -rf --cached dirname && git commit -m "Removed directory from git"
Git will tell you about changes to the contents of the directory until
you stop tracking it. --cached will prevent the folder from actually
being removed from your harddisk.
--
Cheers,
Sverre Rabbelier
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to ignore a modified file?
2009-03-05 8:44 dealmaker
2009-03-05 8:50 ` Sverre Rabbelier
@ 2009-03-05 20:45 ` Robin Rosenberg
1 sibling, 0 replies; 7+ messages in thread
From: Robin Rosenberg @ 2009-03-05 20:45 UTC (permalink / raw)
To: dealmaker; +Cc: git
torsdag 05 mars 2009 09:44:19 skrev dealmaker <vinkhc@gmail.com>:
>
> 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.
git update-index --assume-unchanged <files...>
-- robin
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-03-05 20:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-05 8:53 How to ignore a modified file? Quim K Holland
2009-03-05 10:09 ` Sverre Rabbelier
2009-03-05 10:21 ` Junio C Hamano
2009-03-05 13:58 ` Sverre Rabbelier
-- strict thread matches above, loose matches on Subject: below --
2009-03-05 8:44 dealmaker
2009-03-05 8:50 ` Sverre Rabbelier
2009-03-05 20:45 ` Robin Rosenberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).