{"thread":{"id":"23883","subject":"gitignore - how to ignore only in current directory","startedAt":"2010-05-23T20:28:39Z","lastAt":"2010-05-23T20:38:42Z","messageCount":4,"participants":["Howard Miller","Björn Steinbrink","Bruce Stephens"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"142156","messageId":"AANLkTilGH-Z4IpgosqYPFCl3G2XsKDfAT3pH6vi-wuN8@mail.gmail.com","threadId":"23883","inReplyTo":null,"subject":"gitignore - how to ignore only in current directory","fromName":"Howard Miller","fromEmail":"howard@e-learndesign.co.uk","sentAt":"2010-05-23T20:28:39Z","receivedAt":"2010-05-23T20:28:39Z","isPatch":false,"sender":{"key":"howard@e-learndesign.co.uk","avatar":"https://gravatar.com/avatar/ddb66c6a4a077e52b823ac5b04f33ab927cb90e2ab1eafedaeba07b1920bb99e?d=mp&s=160"},"body":"I want to ignore a particular file name in a particular directory.\nHowever, the same filename may appear in subdirectories and in those\ncases I do *not* want it ignored. The documentation seems to imply\nthat git will read up the directories looking for .gitignore files and\nwill ignore files that I need included.\n\nHave I misunderstood this and/or how can this be done. Any\nenlightenment appreciated!\n"},{"id":"142159","messageId":"808w7a4atz.fsf@tiny.isode.net","threadId":"23883","inReplyTo":"AANLkTilGH-Z4IpgosqYPFCl3G2XsKDfAT3pH6vi-wuN8@mail.gmail.com","subject":"Re: gitignore - how to ignore only in current directory","fromName":"Bruce Stephens","fromEmail":"bruce.stephens@isode.com","sentAt":"2010-05-23T20:33:44Z","receivedAt":"2010-05-23T20:33:44Z","isPatch":false,"sender":{"key":"bruce.stephens@isode.com","avatar":null},"body":"Howard Miller <howard@e-learndesign.co.uk> writes:\n\n> I want to ignore a particular file name in a particular directory.\n> However, the same filename may appear in subdirectories and in those\n> cases I do *not* want it ignored. The documentation seems to imply\n> that git will read up the directories looking for .gitignore files and\n> will ignore files that I need included.\n\nMake the pattern begin with /\n\n[...]\n"},{"id":"142157","messageId":"20100523203651.GA13942@atjola.homenet","threadId":"23883","inReplyTo":"AANLkTilGH-Z4IpgosqYPFCl3G2XsKDfAT3pH6vi-wuN8@mail.gmail.com","subject":"Re: gitignore - how to ignore only in current directory","fromName":"Björn Steinbrink","fromEmail":"b.steinbrink@gmx.de","sentAt":"2010-05-23T20:36:51Z","receivedAt":"2010-05-23T20:36:51Z","isPatch":false,"sender":{"key":"b.steinbrink@gmx.de","avatar":"https://avatars.githubusercontent.com/u/230962?v=4"},"body":"On 2010.05.23 21:28:39 +0100, Howard Miller wrote:\n> I want to ignore a particular file name in a particular directory.\n> However, the same filename may appear in subdirectories and in those\n> cases I do *not* want it ignored.\n\nIf the pattern contains a non-trailing slash, then the pattern is\nmatched against the whole path (relative to the directory the .gitignore\nfile is in), not just against the filename relative to its parent\ndirectory. So if you want to ignore \"foo\" only in the directory the\n.gitignore file is in use \"/foo\" (without the quotes).\n\nBjörn\n"},{"id":"142158","messageId":"AANLkTil3gjr8dS7T5DZJOK8m9mQFRtXIy1TsrUkUCtEX@mail.gmail.com","threadId":"23883","inReplyTo":"808w7a4atz.fsf@tiny.isode.net","subject":"Re: gitignore - how to ignore only in current directory","fromName":"Howard Miller","fromEmail":"howard@e-learndesign.co.uk","sentAt":"2010-05-23T20:38:42Z","receivedAt":"2010-05-23T20:38:42Z","isPatch":false,"sender":{"key":"howard@e-learndesign.co.uk","avatar":"https://gravatar.com/avatar/ddb66c6a4a077e52b823ac5b04f33ab927cb90e2ab1eafedaeba07b1920bb99e?d=mp&s=160"},"body":">> I want to ignore a particular file name in a particular directory.\n>> However, the same filename may appear in subdirectories and in those\n>> cases I do *not* want it ignored. The documentation seems to imply\n>> that git will read up the directories looking for .gitignore files and\n>> will ignore files that I need included.\n>\n> Make the pattern begin with /\n\nAhh thanks!! Now I know the answer I can see that the docs say that (sort of) :)\n"}]}