* gitignore - how to ignore only in current directory
@ 2010-05-23 20:28 Howard Miller
2010-05-23 20:33 ` Bruce Stephens
2010-05-23 20:36 ` Björn Steinbrink
0 siblings, 2 replies; 4+ messages in thread
From: Howard Miller @ 2010-05-23 20:28 UTC (permalink / raw)
To: git
I want to ignore a particular file name in a particular directory.
However, the same filename may appear in subdirectories and in those
cases I do *not* want it ignored. The documentation seems to imply
that git will read up the directories looking for .gitignore files and
will ignore files that I need included.
Have I misunderstood this and/or how can this be done. Any
enlightenment appreciated!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gitignore - how to ignore only in current directory
2010-05-23 20:28 gitignore - how to ignore only in current directory Howard Miller
@ 2010-05-23 20:33 ` Bruce Stephens
2010-05-23 20:38 ` Howard Miller
2010-05-23 20:36 ` Björn Steinbrink
1 sibling, 1 reply; 4+ messages in thread
From: Bruce Stephens @ 2010-05-23 20:33 UTC (permalink / raw)
To: Howard Miller; +Cc: git
Howard Miller <howard@e-learndesign.co.uk> writes:
> I want to ignore a particular file name in a particular directory.
> However, the same filename may appear in subdirectories and in those
> cases I do *not* want it ignored. The documentation seems to imply
> that git will read up the directories looking for .gitignore files and
> will ignore files that I need included.
Make the pattern begin with /
[...]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gitignore - how to ignore only in current directory
2010-05-23 20:28 gitignore - how to ignore only in current directory Howard Miller
2010-05-23 20:33 ` Bruce Stephens
@ 2010-05-23 20:36 ` Björn Steinbrink
1 sibling, 0 replies; 4+ messages in thread
From: Björn Steinbrink @ 2010-05-23 20:36 UTC (permalink / raw)
To: Howard Miller; +Cc: git
On 2010.05.23 21:28:39 +0100, Howard Miller wrote:
> I want to ignore a particular file name in a particular directory.
> However, the same filename may appear in subdirectories and in those
> cases I do *not* want it ignored.
If the pattern contains a non-trailing slash, then the pattern is
matched against the whole path (relative to the directory the .gitignore
file is in), not just against the filename relative to its parent
directory. So if you want to ignore "foo" only in the directory the
.gitignore file is in use "/foo" (without the quotes).
Björn
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gitignore - how to ignore only in current directory
2010-05-23 20:33 ` Bruce Stephens
@ 2010-05-23 20:38 ` Howard Miller
0 siblings, 0 replies; 4+ messages in thread
From: Howard Miller @ 2010-05-23 20:38 UTC (permalink / raw)
To: Bruce Stephens; +Cc: git
>> I want to ignore a particular file name in a particular directory.
>> However, the same filename may appear in subdirectories and in those
>> cases I do *not* want it ignored. The documentation seems to imply
>> that git will read up the directories looking for .gitignore files and
>> will ignore files that I need included.
>
> Make the pattern begin with /
Ahh thanks!! Now I know the answer I can see that the docs say that (sort of) :)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-05-23 20:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-23 20:28 gitignore - how to ignore only in current directory Howard Miller
2010-05-23 20:33 ` Bruce Stephens
2010-05-23 20:38 ` Howard Miller
2010-05-23 20:36 ` Björn Steinbrink
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).