How to manage IDE files in a git repository?

IDE files should not be versioned unless you have a pretty compelling reason. Perhaps your project only builds using a plugin in a particular IDE and you need to version those settings. If you don't need those files to build or run your project, you probably shouldn't version them.

You can ignore those files using Git. In particular, IDE files are good candidates for the global gitignore as each user will use whatever IDEs they want and those settings should be applied to all of their repositories.


It could be helpful to use versioning for the IDE files except files which store user specific settings. See also https://intellij-support.jetbrains.com/hc/en-us/articles/206544839-How-to-manage-projects-under-Version-Control-Systems.

Advantage of using version control for these files is

  • Sharing of code styles for the whole development team
  • Manage and share nested repositories that are under version control as well.
  • etc.