Re: gitignore - how to ignore only in current directory
- From
Björn Steinbrink <b.steinbrink@gmx.de>
- Date
- May 23, 2010, 20:36 UTC
- Message-ID
- <20100523203651.GA13942@atjola.homenet>
- In-Reply-To
- <AANLkTilGH-Z4IpgosqYPFCl3G2XsKDfAT3pH6vi-wuN8@mail.gmail.com>
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