Unless a repo consisted of several independent projects, it seems it would be simplest to just have one .gitignore file at the root of the repo than various one
There are many scenarios where you want to commit a directory to your Git repo but without the files in it, for example the logs, cache, uploads directories etc.
So what I always do is to add a .gitignore file in those directories with the following content:
*
!.gitignore
With this .gitignore file, Git will not track any files in those directories yet still allow me to add the .gitignore file and hence the directory itself to the repo.