Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the .idea folder?

When I create a project in JetBrains WebStorm, a folder called .idea gets created. Is it okay if I delete it? Will it affect my project?

like image 313
ECMAScript Avatar asked Jun 11 '13 16:06

ECMAScript


4 Answers

When you use the IntelliJ IDE, all the project-specific settings for the project are stored under the .idea folder.

Project settings are stored with each specific project as a set of xml files under the .idea folder. If you specify the default project settings, these settings will be automatically used for each newly created project.

Check this documentation for the IDE settings and here is their recommendation on Source Control and an example .gitignore file.

Note: If you are using git or some version control system, you might want to set this folder "ignore". Example - for git, add this directory to .gitignore. This way, the application is not IDE-specific.

like image 69
karthikr Avatar answered Nov 15 '22 10:11

karthikr


There is no problem in deleting this. It's not only the WebStorm IDE creating this file, but also PhpStorm and all other of JetBrains' IDEs.

It is safe to delete it but if your project is from GitLab or GitHub then you will see a warning.

like image 25
MH Fuad Avatar answered Nov 15 '22 10:11

MH Fuad


As of year 2020, JetBrains suggests to commit the .idea folder.
The JetBrains IDEs (webstorm, intellij, android studio, pycharm, clion, etc.) automatically add that folder to your git repository (if there's one).
Inside the folder .idea, has been already created a .gitignore, updated by the IDE itself to avoid to commit user related settings that may contains privacy/password data.

It is safe (and usually useful) to commit the .idea folder.

like image 13
Yusef Maali Avatar answered Nov 15 '22 08:11

Yusef Maali


It contains your local IntelliJ IDE configs. I recommend adding this folder to your .gitignore file:

# intellij configs
.idea/
like image 10
Damion Gomez Avatar answered Nov 15 '22 08:11

Damion Gomez