How to prevent IDEA from changing `misc.xml` and ...
# kontributors
i
How to prevent IDEA from changing
misc.xml
and other files that shouldn't be changed by a PR?
m
That file should be in your
.gitignore
anyway? 🤔
i
@Marc Knaup I mean
.idea/misc.xml
in the Kotlin project...
I can't add it to
gitignore
, but IDEA changes it
m
If I understand you correctly you don’t want Git Pull Requests to change
.idea/misc.xml
. Is that correct? In that case the problem is that the file is in Git in the first place. It shouldn’t be. You can’t prevent the IDE from changing these files. They’re there solely for the IDE because it needs them 😅 Some make sense to be added to Git but most shouldn’t be.
t
@Iaroslav Postovalov another approach - https://stackoverflow.com/a/936290
a
@Marc Knaup
In that case the problem is that the file is in Git in the first place. It shouldn’t be.
You would be surprised then: https://github.com/JetBrains/kotlin/tree/master/.idea
m
Interesting. I wish IDEA would split all configuration files so that it’s clear what can be put into Git and what is user-specific. Some files are one or the other and some files seem to be mixed 😕
a
As much as it does not make sense in the Kotlin project context, I am on the side of not having IDE-specific files in version control. But there are certain steps towards a better world from JB. Quite recently, they introduced a new location for run configurations (
.run
directory instead of
.idea/runConfigurations
). I think it is related exactly to that problem.
m
I don’t like the
.run
folder. Naming it like that implies that it’s not IDE-specific but it still is. I’m absolutely pro adding IDE configuration to Git. You want everyone in the team to operate with the same environment or else you’ll get chaos.
a
But you see, it’s not IDE specific configuration that you need in Git, it’s build/lint/style specific things. Those can and should be IDE-independent.
m
Yes, but there is no standard for that and it’s unlikely that someone will solve that in the near future. IDEs are just too different. So until that happened we’re stuck with what we have.
😞 1
866 Views