From: Björn Steinbrink Date: Sun, 23 May 2010 20:36:51 GMT Subject: Re: gitignore - how to ignore only in current directory Message-ID: <20100523203651.GA13942@atjola.homenet> In-Reply-To: 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