What is up with git and the .idea folder?
2 人关注
Honestly, I have to say, that I found working with git in Webstorm to be an absolute menace.
Most annoying of all:
so often, I find that the project view is empty except for these files:
I was advised to delete the files under .idea and reopen Webstorm when this happens. Most of the time it works.
Right now, it didn't.
And for whatever reason, gitignore is now unversioned, after I switched to my main branch again
I want to try the same spiel again, now I find there is a .gitignore under .idea
why?
请先登录再写评论。
I've deleted the entire .idea folder and restarted Webstorm.
Now I can see the files in the project view again.
but when I look at:
why does the vcs even bother with these files? I've ignored them.
This have caused countless issues before, not just today.
And I finally want to fix it once and for all.
think once a file is added to git. it doesn't matter, if it is in .gitignore. Am I right?
Though I don't think I ever actively added them, they are clearly versioned.
I just adjusted my .gitignore to this and hope that helps:
also:
How do I deal with files, that are ignored?
My .env disappeared.
I'm very lucky, I was able to recreate .env from my TimeMachine.
But this is not the first time this happens. I'm sure I'm missing something.
-----
And Webstorm is asking me, if I want to add...
Elena Pogorelova perhaps you are able to help?
> think once a file is added to git. it doesn't matter, if it is in .gitignore. Am I right?
Yes, exactly
It's recommended that you add *.iml and modules.xml to Git; see https://intellij-support.jetbrains.com/hc/en-us/articles/206544839-How-to-manage-projects-under-Version-Control-Systems