For IDE files a global ignore file is useful, then one doesn't have to repeat this for all repos and not all contributors need to add their IDE's files to a shared file. For local there is also .git/info/exclude per repo.
Yes, that’s good advice. I was referring to the concept of gitignore in general. At least when I learnt git from some tutorials, gitignore was treated like an advanced topic and I was fumbling with git for a while with all these artefacts creeping into my repo until I learnt of this simple solution