From: Florian Köberle Date: Sat, 23 May 2009 09:18:25 GMT Subject: gitignore bug: including files in an excluded directoy does not work. Message-ID: <809f58722b8bdb916fa7816cd80d3833-EhVcXl1BQAtYRw8cBxcBWQEwfgFLV15YQUBGAEFbXkI3XV8WXlhwH1RQWEFeRENtXlhdQ1hSWAtfWg==-webmailer2@server05.webmailer.hosteurope.de> steps to reproduce: git init echo /src/config > .gitignore echo \!/src/config/readme.txt >> .gitignore mkdir -p src/config touch src/config/readme.txt git add src expected results: git should add the readme.txt file actual result: git doesn't add the readme.txt file additional comments: pre to the commit d6b8fc303b it was possible to archive the wished effect with this .gitignore file: ------------------ /src/config/ !/src/config/readme.txt ------------------ The pre d6b8fc303b git fails to detect that it can exclude src/config. Thus it checks the directory content and finds out that the readme.txt matches both - the exclude and the include pattern. commit d6b8fc303b389b026f2bf9918f6f83041488989b Author: Junio C Hamano Date: Thu Jan 31 01:17:48 2008 -0800 gitignore(5): Allow "foo/" in ignore list to match directory "foo" Best regards, Florian Köberle