I\'m using msysgit and have a project tree that contains many bin/ folders in the tree. Using the .gitignore file in the root of the project I need to ignore all .dll files
Just had a similar problem and realized: The files were already added and checked in to git.
How to recognize the difference: Git didn't show the files as "new", but as "modified". This details has cost me quite some time...
If that is the problem, simply "git rm" these files and start over. Suddenly, .gitignore starts to work as expected.