Don't delete lines from Java Codestyle Settings that have default values?



In our project we have put .idea/codeStyles/Project.xml into our Git repository, to share codestyle settings across the whole team. Unfortunately, IntelliJ IDEA deletes them automatically when they are the default values. Now every developer sees a change in their local repo. Is it possible to persist these settings, so IDEA won't delete it but without differing from the default values?

There is also a certain risk for us: If the default value for any setting is changed by IntelliJ, we aren't able to notice this. (This applies for all values, not only imports)


The settings have their origin here:

评论操作 固定链接

No, this behavior is by design. Only the changes are stored in the IDE config files (the same for keymap, etc).

评论操作 固定链接

You can use EditorConfig as a workaround.