From: Seth Robertson Date: Sat, 25 Sep 2010 19:23:19 GMT Subject: .gitignore Bug Report on the behavior of * Message-ID: <201009251923.o8PJNJYE031841@no.baka.org> I'm not sure if this is a documentation bug, an actual bug, or my mis-interpretation of what is supposed to happen, however, this behavior was not expected by other people as well. This was tested using git 1.7.2.3 and 1.7.3 My sample configuration: ---------------------------------------------------------------------- mkdir foo; cd foo; git init; echo A > A; mkdir B; echo B > B/B git add .; git commit -a -m "initial" ---------------------------------------------------------------------- # Properly shows X and B/XX as untracked, as I expected echo X > X; echo XX > B/XX; git status # I expected B/XX to show up as untracked rm -f .gitignore B/.gitignore echo '*' > .gitignore; echo '!*' > B/.gitignore; git status # I expected B/XX to show up as untracked rm -f .gitignore B/.gitignore echo '/*' > .gitignore; git status # Works as I expected rm -f .gitignore B/.gitignore echo '/*X' > .gitignore; git status # Works as I expected rm -f .gitignore B/.gitignore echo '*X' > .gitignore; echo '!*X' > B/.gitignore; git status # Works as I expected rm -f .gitignore B/.gitignore echo -e '/*\n!/B' > .gitignore; git status -Seth Robertson