可能重复:
IntelliJ IDEA的9/10,要检查哪些文件夹到(或不签入)源代码控制?
我开始使用WebStorm于Web开发,我不知道该怎么加,什么从我们的Git仓库排除。 显然,里面的一些文件.idea
文件夹中的意思是版本控制,如外部库设置( jsLibraryMappings.xml
),但其他人可能会经常改变,并开发专用的(例如, workspace.xml
)。
什么是推荐的.gitignore的WebStorm / IntelliJ IDEA的模式?
PS已经有关于这个问题,但通常只注重是否包括整个.idea
文件夹或是否完全排除。 我认为,一些内部文件.idea
文件夹应,而其他不应该版本控制,我试图找出哪些。
官方支持页面应该回答你的问题。
因此,在您的.gitignore你可能会忽略与结尾的文件.iws
和workspace.xml
和tasks.xml
文件。
我只是想提出一个较新的替代品。 有一个在线工具,产生.gitignore
基于操作系统,集成开发环境以及您可能使用的编程语言文件。
gitignore.io
编辑声明:不要复制这个文件,复制该网站,而不是生成的文件,他们做保持它更新一个好工作。 这只是一个例子。
对生成的文件IntelliJ
包含以下
# Created by https://www.gitignore.io/api/intellij
### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
# Gradle:
.idea/gradle.xml
.idea/libraries
# Mongo Explorer plugin:
.idea/mongoSettings.xml
## File-based project format:
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
https://www.gitignore.io/api/jetbrains
创建者https://www.gitignore.io/api/jetbrains
### JetBrains ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
# Gradle:
.idea/gradle.xml
.idea/libraries
# Mongo Explorer plugin:
.idea/mongoSettings.xml
## File-based project format:
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### JetBrains Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
对于几年我是使用特定的支持者.gitignore
的IntelliJ与此建议配置 。
不再。
的IntelliJ是相当频繁更新,内部配置文件规格改变往往比我想和JetBrains的旗舰在擅长自动配置本身基于Maven的/ gradle产出的/ etc构建文件。
所以我的建议是给所有的编辑配置文件了项目,并有用户配置编辑器来自己的喜好。 事情是这样的代码风格能够并且应该在构建级别配置; 说使用谷歌代码风格或CheckStyle的 Maven的/摇篮/ SBT /等直接。
这将确保一致性和叶编辑文件出的源代码,在我个人看来,是他们应该的。
JetBrains公司提供他们的节目以下的.gitignore
https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# 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
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser