Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pycharm asks me if I want to add .idea\vcs.xml to Git

When using Pycharm I got a popup out of nowhere asking me if I wanted to add this file to Git, and noting that I could do it manually later if I wanted. What is this file, and why is this recommendation being given to me?

like image 514
Stephen Avatar asked Jul 19 '17 18:07

Stephen


People also ask

What is idea VCS xml?

vcs. xml - this file is for VCS-related internal information, as which VCS is enabled, etc. runConfigurations - this folder is for shared run configurations. Other files inside of . idea folder can be safely excluded from VCS (ex.

How do I add VCS to IntelliJ?

Add files to VCSOpen the Commit tool window Alt+0 . Put any files in the Unversioned Files changelist under version control by pressing Ctrl+Alt+A or selecting Add to VCS from the context menu. You can either add the entire changelist, or select separate files.

Can I delete .idea folder Pycharm?

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.

How do I ignore Unversioned files in IntelliJ?

IntelliJ, however, adds its own mechanism to ignore files:Window "Version Control", Tab "Local Changes", Button "Configure Ignored Files" (on the left).


3 Answers

All the project specific settings for project are stored under the .idea folder.

While working, a new file (vcs.xml) was created and hence it gives you the option to add it to Git. The files in the .idea/ should generally not reach Git, and it's usually better to add it to .gitignore file.

like image 56
Saurabh Shrivastava Avatar answered Oct 06 '22 00:10

Saurabh Shrivastava


If you gitignore the .idea folder then others will not be able to access project specific settings like run configuration, environment variables, build settings, etc., and other miscellaneous additions like project specific dictionaries.

Add vcs.xml to your project and don't entirely gitignore .idea. In fact, Jetbrains recommends to ignore some files (listed below) while still adding the rest to the repo.

Use this .gitignore for all your Jetbrains based products: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm

Just in case the link becomes invalid for any reason I'm pasting it directly here

# User-specific stuff .idea/**/workspace.xml .idea/**/tasks.xml .idea/**/usage.statistics.xml .idea/**/dictionaries .idea/**/shelf  # Sensitive or high-churn files .idea/**/dataSources/ .idea/**/dataSources.ids .idea/**/dataSources.local.xml .idea/**/sqlDataSources.xml .idea/**/dynamic.xml .idea/**/uiDesigner.xml .idea/**/dbnavigator.xml  # Gradle .idea/**/gradle.xml .idea/**/libraries  # Gradle and Maven with auto-import # When using Gradle or Maven with auto-import, you should exclude module files, # since they will be recreated, and may cause churn.  Uncomment if using # auto-import. # .idea/modules.xml # .idea/*.iml # .idea/modules  # CMake cmake-build-*/  # Mongo Explorer plugin .idea/**/mongoSettings.xml  # File-based project format *.iws  # IntelliJ out/  # mpeltonen/sbt-idea plugin .idea_modules/  # JIRA plugin atlassian-ide-plugin.xml  # Cursive Clojure plugin .idea/replstate.xml  # Crashlytics plugin (for Android Studio and IntelliJ) com_crashlytics_export_strings.xml crashlytics.properties crashlytics-build.properties fabric.properties  # Editor-based Rest Client .idea/httpRequests 

For more details, refer to Jetbrains Support Article

like image 31
Saravanabalagi Ramachandran Avatar answered Oct 06 '22 01:10

Saravanabalagi Ramachandran


There is good official description from JetBrains of which files to put into git.

So in your .gitignore you might ignore the files ending with .iws, and the workspace.xml and tasks.xml files. Here you can find a very good example of gitignore file for JetBrains IDEs.

like image 20
grundic Avatar answered Oct 06 '22 00:10

grundic