.gitignore for IntelliJ IDEA
34 ignore rules for IntelliJ IDEA, ready to copy into your repository.
JetBrains IDE for Java and other JVM languages
The complete .gitignore for IntelliJ IDEA
# Generated by LFGitignore - https://lfgitignore.com
# Created: 2025-08-25 07:46:25 UTC
# Technologies: IntelliJ IDEA
### IntelliJ IDEA ###
# IntelliJ workspace settings
.idea/**/workspace.xml
# IntelliJ tasks
.idea/**/tasks.xml
# IntelliJ usage statistics
.idea/**/usage.statistics.xml
# IntelliJ user dictionaries
.idea/**/dictionaries
# IntelliJ shelved changes
.idea/**/shelf
.idea/**/aws.xml
# IntelliJ content model
.idea/**/contentModel.xml
# IntelliJ database configurations
.idea/**/dataSources/
# IntelliJ datasource IDs
.idea/**/dataSources.ids
# IntelliJ local datasources
.idea/**/dataSources.local.xml
# IntelliJ SQL datasources
.idea/**/sqlDataSources.xml
# IntelliJ dynamic elements
.idea/**/dynamic.xml
# IntelliJ UI designer
.idea/**/uiDesigner.xml
# IntelliJ database navigator
.idea/**/dbnavigator.xml
# IntelliJ Gradle settings
.idea/**/gradle.xml
# IntelliJ project libraries
.idea/**/libraries
cmake-build-*/
.idea/**/mongoSettings.xml
# IntelliJ workspace file
*.iws
out/
.idea_modules/
atlassian-ide-plugin.xml
.idea/replstate.xml
.idea/sonarlint/
# see https://community.sonarsource.com/t/is-the-file-idea-idea-idea-sonarlint-xml-intended-to-be-under-source-control/121119
.idea/sonarlint.xml
com_crashlytics_export_strings.xml
# Crashlytics config
crashlytics.properties
# Crashlytics build
crashlytics-build.properties
# Fabric properties
fabric.properties
.idea/httpRequests
http-client.private.env.json
.idea/caches/build_file_checksums.ser
.idea/.cache/.Apifox_Helper
.idea/ApifoxUploaderProjectSetting.xml
What these IntelliJ IDEA rules actually ignore
Every pattern below, and why it belongs in your .gitignore.
User-specific stuff
| Pattern | What it ignores |
|---|---|
.idea/**/workspace.xml |
IntelliJ workspace settings |
.idea/**/tasks.xml |
IntelliJ tasks |
.idea/**/usage.statistics.xml |
IntelliJ usage statistics |
.idea/**/dictionaries |
IntelliJ user dictionaries |
.idea/**/shelf |
IntelliJ shelved changes |
AWS User-specific
| Pattern | What it ignores |
|---|---|
.idea/**/aws.xml |
AWS User-specific |
Generated files
| Pattern | What it ignores |
|---|---|
.idea/**/contentModel.xml |
IntelliJ content model |
Sensitive or high-churn files
| Pattern | What it ignores |
|---|---|
.idea/**/dataSources/ |
IntelliJ database configurations |
.idea/**/dataSources.ids |
IntelliJ datasource IDs |
.idea/**/dataSources.local.xml |
IntelliJ local datasources |
.idea/**/sqlDataSources.xml |
IntelliJ SQL datasources |
.idea/**/dynamic.xml |
IntelliJ dynamic elements |
.idea/**/uiDesigner.xml |
IntelliJ UI designer |
.idea/**/dbnavigator.xml |
IntelliJ database navigator |
Gradle
| Pattern | What it ignores |
|---|---|
.idea/**/gradle.xml |
IntelliJ Gradle settings |
.idea/**/libraries |
IntelliJ project libraries |
CMake
| Pattern | What it ignores |
|---|---|
cmake-build-*/ |
CMake |
Mongo Explorer plugin
| Pattern | What it ignores |
|---|---|
.idea/**/mongoSettings.xml |
Mongo Explorer plugin |
File-based project format
| Pattern | What it ignores |
|---|---|
*.iws |
IntelliJ workspace file |
IntelliJ
| Pattern | What it ignores |
|---|---|
out/ |
IntelliJ |
.idea_modules/ |
mpeltonen/sbt-idea plugin |
JIRA plugin
| Pattern | What it ignores |
|---|---|
atlassian-ide-plugin.xml |
JIRA plugin |
Cursive Clojure plugin
| Pattern | What it ignores |
|---|---|
.idea/replstate.xml |
Cursive Clojure plugin |
SonarLint plugin
| Pattern | What it ignores |
|---|---|
.idea/sonarlint/ |
SonarLint plugin |
.idea/sonarlint.xml |
see https://community.sonarsource.com/t/is-the-file-idea-idea-idea-sonarlint-xml-intended-to-be-under-source-control/121119 |
Crashlytics plugin (for Android Studio and IntelliJ)
| Pattern | What it ignores |
|---|---|
com_crashlytics_export_strings.xml |
Crashlytics plugin (for Android Studio and IntelliJ) |
crashlytics.properties |
Crashlytics config |
crashlytics-build.properties |
Crashlytics build |
fabric.properties |
Fabric properties |
Editor-based HTTP Client
| Pattern | What it ignores |
|---|---|
.idea/httpRequests |
Editor-based HTTP Client |
http-client.private.env.json |
Editor-based HTTP Client |
Android studio 3.1+ serialized cache file
| Pattern | What it ignores |
|---|---|
.idea/caches/build_file_checksums.ser |
Android studio 3.1+ serialized cache file |
Apifox Helper cache
| Pattern | What it ignores |
|---|---|
.idea/.cache/.Apifox_Helper |
Apifox Helper cache |
.idea/ApifoxUploaderProjectSetting.xml |
Apifox Helper cache |
How to use this .gitignore for IntelliJ IDEA
- Copy the IntelliJ IDEA rules above, or download the file directly.
- Create a file named .gitignore at the root of your Git repository and paste the rules into it.
- If some of those files are already tracked, run git rm -r --cached . then commit again — Git only applies ignore rules to untracked files.
- Commit the .gitignore so everyone on the team shares the same rules.