According to http://www.kernel.org/pub/software/scm/git/docs/gitignore.html .gitignore files can exist in any hierarchy level of the repository.
Also precedence has to be properly taken into account.