>~/.config/git/ignore
This never be considered as a solution. It only works on that PC, when working with a team, this approach is wrong in so many levels.
I host my own Forgejo server/repos, it is just me but .gitignore just makes more sense. It is on the root of the project, and I only have one file to manage. No matter that PC/device I am using, they are automatically covered.