Search code examples
pythongitpycharmgitignore

Should I ignore the .idea folder when using PyCharm with Git?


I read about Git integration in PyCharm, and created a Git repository from PyCharm. I did this in PyCharm because I was hoping PyCharm would know whether the .idea folder should be ignored, and if that's the case, it would automatically create a .gitignore file with the line .idea/ in it.

But it didn't, so I assumed that I shouldn't ignore the .idea foler. However, I did a quick search and found someone's example .gitignore file, here, which clearly ignores the .idea folder.

So, my question is, should the .idea folder be ignored or not?


Solution

  • Ignoring the whole .idea folder is not necessarily the best idea. There's a number of similar discussions here about this.

    But I suggest to check the official FAQ on this matter.