I have a directory structure like this:
.git/
.gitignore
main/
...
tools/
...
...
Inside main and tools, and any other directory, at an
In my case encoding of gitignore file was problematic, check if it is UTF-8
I didn't see it mentioned here, but this appears to be case sensitive. Once I changed to /Bin the files were ignored as expected.
I think it is worth to mention for git beginners:
If you already have a file checked in, and you want to ignore it, Git will not ignore the file if you add a rule later. In those cases, you must untrack the file first, by running the following command in your terminal:
git rm --cached
So if you want add to ignore some directories in your local repository (which already exist) after editing .gitignore you want to run this on your root dir
git rm --cached -r .
git add .
It will basically 'refresh' your local repo and unstage ignored files.
See:
http://git-scm.com/docs/git-rm,
https://help.github.com/articles/ignoring-files/