Multiple git repos in same dir, i.e. code repo and IDE settings repo

Given a repository that contains only source code and build scripts, no IDE setting files.

Is there a way to have a separate repository for just the IDE specific configuration files, so that the IDE config files and the source share the same directories, and changes to config files can be synced between different PCs.

The programmers are free to use whichever IDE they want, and the policy is that the main repository should remain free of any specific IDE dependencies. All IDE specific file patterns are in .gitignore.

The repository contains several projects in multiple languages and some generated code, and setting up a specific IDE requires some work, defining source roots, compiler settings, library paths, run configurations, ignored folders, and so on.

So I would like to at least have some way to sync the configurations across different machines for myself, and perhaps even share that configuration with others.

Or is there another appropriate approach, instead of multiple git repositories?