This should just be added to your global gitignore. https://help.github.com/articles/ignoring-files#global-gitignore

IMO, the only things that should be in a repo's gitignore, are items that the project itself create. If your IDE creates files that need to be ignored, that is not the concern of this repo's gitignore.