Maybe this would help you set up a repository:
https://github.com/github/gitignore/tree/master/Global
For your case, my guess is you should use this: https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore
in your global .gitignore file