Does anyone git ignore their `.idea` folder? Why?
# random
d
Does anyone git ignore their
.idea
folder? Why?
👌 2
d
I try to, because there are some local configuration settings that can conflict when multiple people share the directory, and gradle should be the source of truth for project configuration. There are some things I would like to be able to share dealing with code style, but I haven't tried to figure out how to share just those things without some of the other problematic files.
s
for 95% of projects I do because the only thing I’d really want to keep in the repo are runconfigs - various other editor settings are almost always user preference and should stay untracked. the other 5% are projects where the build or testing specifically involves IntelliJ
👍 1
d
I wonder if run config can be done via Gradle or something.
s
I wouldn’t be surprised if it could, but gradle is not something I work on regularly
d
Do you use maven?
s
oh, no, I use gradle for my work, but I don’t spend much time writing tasks or anything similar
sorry if I was unclear lol 😅
d
Ah I see. I was more or less the same until I discovered multiplatform, then I had no choice.
s
gotcha
😁 1
g
I was using some configuration to try to keep some configurations, but this started to create a mess to me ^^. So I did a step back and now I’m ignoring .idea completely, but maybe I’ll be adding the run configurations again in the future.
The kotlin oficial repo maybe can help also: https://github.com/JetBrains/kotlin/blob/master/.gitignore
k
I trust whatever https://gitignore.io/ gives me
🔍 1
n
Ignoring the .idea dir helps to avoid some security issues, and ensures that IDE settings aren't included especially if a different tool is used for editing files.
s
Big mood there
1
The other day I accidentally committed some AWS credentials stored in my environmental variables in the runconfig
😱 1
😲 2
It was after a session of headdesking trying to get IJ to pick up on my env vars
It’s all right, it was just QA credentials, so nothing particularly important
That said, I understand the sentiment
😌 1
s
I ignore everything in .idea except for .idea/codeStyles/, which I include so that everyone on the same project shares the same code style settings for autoformatting and such.