.gitignore for Eclipse

28 ignore rules for Eclipse, ready to copy into your repository.

Open-source IDE primarily for Java development

The complete .gitignore for Eclipse

# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-08-05 01:27:45 UTC
# Technologies: Eclipse

### Eclipse ###
# Backup file
*.bak
# Eclipse workspace metadata
.metadata
# Eclipse output directory
bin/
# Temporary files directory
tmp/
# Temporary files
*.tmp
# Vim swap file
*.swp
*~.nib
# Android local config
local.properties
# Eclipse project settings
.settings/
# Eclipse load path
.loadpath
# Eclipse recommenders
.recommenders
# Eclipse external tools
.externalToolBuilders/
# Eclipse launch configuration
*.launch
*.pydevproject
# Eclipse C/C++ project
.cproject
.autotools
# Eclipse annotation factory
.factorypath
# Eclipse build path
.buildpath
# Eclipse target platform
.target
# Eclipse Tern.js project
.tern-project
# Eclipse TeXlipse
.texlipse
# Eclipse Spring beans
.springBeans
# Eclipse code recommenders
.recommenders/
# Eclipse annotation processing
.apt_generated/
.apt_generated_tests/
# Eclipse Scala cache
.cache-main
# Eclipse Scala dependencies
.scala_dependencies
# Eclipse Scala worksheet
.worksheet

What these Eclipse rules actually ignore

Every pattern below, and why it belongs in your .gitignore.

General

Pattern What it ignores
.metadata Eclipse workspace metadata
*.bak Backup file
bin/ Eclipse output directory
tmp/ Temporary files directory
*.tmp Temporary files
*.swp Vim swap file
*~.nib General
local.properties Android local config
.settings/ Eclipse project settings
.loadpath Eclipse load path
.recommenders Eclipse recommenders

External tool builders

Pattern What it ignores
.externalToolBuilders/ Eclipse external tools

Locally stored "Eclipse launch configurations"

Pattern What it ignores
*.launch Eclipse launch configuration

PyDev specific (Python IDE for Eclipse)

Pattern What it ignores
*.pydevproject PyDev specific (Python IDE for Eclipse)

CDT-specific (C/C++ Development Tooling)

Pattern What it ignores
.cproject Eclipse C/C++ project

CDT- autotools

Pattern What it ignores
.autotools CDT- autotools

Java annotation processor (APT)

Pattern What it ignores
.factorypath Eclipse annotation factory

PDT-specific (PHP Development Tools)

Pattern What it ignores
.buildpath Eclipse build path
.target Eclipse target platform

Tern plugin

Pattern What it ignores
.tern-project Eclipse Tern.js project

TeXlipse plugin

Pattern What it ignores
.texlipse Eclipse TeXlipse

STS (Spring Tool Suite)

Pattern What it ignores
.springBeans Eclipse Spring beans

Code Recommenders

Pattern What it ignores
.recommenders/ Eclipse code recommenders

Annotation Processing

Pattern What it ignores
.apt_generated/ Eclipse annotation processing
.apt_generated_tests/ Annotation Processing

Scala IDE specific (Scala & Java development for Eclipse)

Pattern What it ignores
.cache-main Eclipse Scala cache
.scala_dependencies Eclipse Scala dependencies
.worksheet Eclipse Scala worksheet

How to use this .gitignore for Eclipse

  1. Copy the Eclipse rules above, or download the file directly.
  2. Create a file named .gitignore at the root of your Git repository and paste the rules into it.
  3. If some of those files are already tracked, run git rm -r --cached . then commit again — Git only applies ignore rules to untracked files.
  4. Commit the .gitignore so everyone on the team shares the same rules.

Other IDE .gitignore templates

See every IDE template