Pycharm asks me if I want to add .idea\vcs.xml to Git
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.
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.
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
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.
Some files should be committed to source control, some should be excluded. Usually, one needs to share the following:
indexLayout.xml - this file is for the information about external folders attached to the solution, which are not the part of a .NET project. Such folders can be added via right-click on a solution -> “Attach Existing Folder...”.
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. modules.xml and riderModule.iml), as Rider can generate them again.
Per JetBrains, below files can be safely excluded: https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore