Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm and source control, the .idea directory, commit or not commit, that is the question

I started a new PyCharm project and want to version it with Mercurial.

There is a .idea directory in the project directory with the following files (and my assumption about whether to version them or not)

  • .name - contains the name of the project (version: yes)
  • encodings.xml - contains defaults(?) for text file encoding (version: yes)
  • misc.xml - contains something about components, and which Python executable to use (version: no - because it hard-codes the path to python.exe)
  • modules.xml - contains a list of modules, with the name of the project in them (version: yes)
  • ProjectName.iml (version: yes)
  • vcs.xml - specifies which VCS to use (version: yes
  • workspace.xml - seems to list layout information for PyCharm windows (version: no)

Are my assumptions correct?

like image 791
Lasse V. Karlsen Avatar asked Feb 18 '11 09:02

Lasse V. Karlsen


People also ask

Should you commit .idea folder?

You shouldn't ignore the idea folder. you're supposed to commit almost all of it to the repo.

What is .idea folder in PyCharm?

The . idea folder (hidden on OS X) in the solution root contains IntelliJ's project specific settings files. These include per-project details such as VCS mapping and run and debug configurations, as well as per-user details, such as currently open files, navigation history and currently selected configuration.

Should you ignore .idea folder?

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 .

Why does PyCharm create .idea folder?

If the people in your group working on PyCharm to write python code, PyCharm will create . idea folder to store different settings like interpreter path, etc.


1 Answers

All files except workspace.xml should be shared, see the FAQ.

like image 192
CrazyCoder Avatar answered Nov 16 '22 02:11

CrazyCoder