How to add something to .gitignore so that the match is not recursive?
For example, I want to ignore the foo directory and the bar.txt file in the current directory, but not everything that exists in the subdirectories.
I tried this for my .gitignore file:
foo/ bar.txt
But unfortunately, git applies this recursively, so otherdir/bar.txt and otherdir/foo/ also ignored, which is not what I want.
(Is there a command in git that shows me all the ignored files and refers to a .gitignore file that is responsible for ignoring the file? That would be useful for debugging.)
git gitignore ignore
pauldoo Mar 19 '10 at 11:12 2010-03-19 11:12
source share