put .gitignore in your main catalog

git status (you will see which files you can commit)
git add -A
git commit -m "message"
git push
Answer from Marcin Szymczak on Stack Overflow
🌐
GitHub
github.com › github › gitignore › blob › main › Global › Eclipse.gitignore
gitignore/Global/Eclipse.gitignore at main · github/gitignore
# PyDev specific (Python IDE for Eclipse) *.pydevproject · · # CDT-specific (C/C++ Development Tooling) .cproject · · # CDT- autotools · .autotools · · # Java annotation processor (APT) .factorypath · · # PDT-specific (PHP Development Tools) .buildpath ·
Author   github
🌐
The Eclipse Foundation
eclipse.org › forums › index.php › t › 499445
Eclipse Community Forums: EGit / JGit » Automatically generated .gitignore files | The Eclipse Foundation
The Eclipse Foundation - home to a global community, the Eclipse IDE, Jakarta EE and over 350 open source projects, including runtimes, tools and frameworks.
Discussions

.gitignore for Eclipse CDT
Many free IDE from silicon vendors (such as ST and NXP) are Eclipse-CDT based. Could you suggest a good .gitignore file? Mainly I don't know... More on embeddedrelated.com
🌐 embeddedrelated.com
1
December 2, 2019
git - Gitignore for Eclipse - Stack Overflow
In our semester group we are using eclipse as an IDE for developing a Compiler. The issue is when it comes to git. Which files are okay to be ignored and which are crucial. It works fine on my comp... More on stackoverflow.com
🌐 stackoverflow.com
Gitignore not working
The problem Files marked to be ignored are not being ignored in the changes window Release version 3.5.1 Operating system windows 11 Steps to reproduce the behavior open github desktop Review list ... More on github.com
🌐 github.com
2
August 11, 2025
eclipse - .gitignore for various IDEs - Salesforce Stack Exchange
So I searched almost everywhere for a reasonable .gitignore that also covers multiple IDEs while also making it clear which is which. The examples I found so far a poorly structured and do not More on salesforce.stackexchange.com
🌐 salesforce.stackexchange.com
October 7, 2020
🌐
The Eclipse Foundation
eclipse.org › forums › index.php › t › 816703
Eclipse Community Forums: EGit / JGit » gitignore and importing projects | The Eclipse Foundation
September 22, 2014 - The Eclipse Foundation - home to a global community, the Eclipse IDE, Jakarta EE and over 350 open source projects, including runtimes, tools and frameworks.
🌐
GitHub
gist.github.com › chhh › 4961200
.gitignore file for IDEA, Eclipse, NetBeans · GitHub
.gitignore file for IDEA, Eclipse, NetBeans. GitHub Gist: instantly share code, notes, and snippets.
🌐
Embedded Related
embeddedrelated.com › home › comp.arch.embedded › .gitignore for eclipse cdt
.gitignore for Eclipse CDT
December 2, 2019 - You'll definitely want .project and .cproject under source control. After you've finally got the project working, RubeMX will trash them when you regenerate. .settings I save as well. Here's my typical .gitignore: **/Debug/ **/Release/ **/html/ **/Backup/ **/*.bak **/.~lock.* Hope that helps!
🌐
JamesCoyle.net
jamescoyle.net › home › gitignore file for eclipse projects
gitignore file for Eclipse Projects | JamesCoyle.net Limited
November 21, 2019 - This is an example of a .gitignore file for an Eclipse project to ensure temporary files, build files and project settings are not added to repository commits.
Find elsewhere
🌐
GitHub
gist.github.com › Avinashachu007 › 58450a38a3a77d7c9923a55023f470f4
Gitignore for Java,maven,Eclipse,Spring · GitHub
Gitignore for Java,maven,Eclipse,Spring. GitHub Gist: instantly share code, notes, and snippets.
🌐
Toptal
toptal.com › developers › gitignore › api › eclipse
Created by https://www.toptal.com/developers/gitignore/api/eclipse
Created by https://www.toptal.com/developers/gitignore/api/eclipse · Edit at https://www.toptal.com/developers/gitignore?templates=eclipse · Eclipse · metadata bin/ tmp/ *.tmp *.bak *.swp *~.nib local.properties .settings/ .loadpath .recommenders · External tool builders · externalToo...
🌐
IQCode
iqcode.com › code › shell › gitignore-for-eclipse
gitignore for eclipse Code Example
*target* *.jar *.war *.ear *.class # eclipse specific git ignore *.pydevproject .project .metadata bin/** tmp/** tmp/**/* *.tmp *.bak *.swp...
🌐
GitHub
github.com › desktop › desktop › issues › 20877
Gitignore not working · Issue #20877 · desktop/desktop
August 11, 2025 - touch .gitignore *.txt /data /documents /index_UnderRepair.php *.project *.pdf *.docx *.doc admin/config2.php /admin includes/functionsOrig.php .settings .settings/org.eclipse.php.core.prefs /.settings .project .settings/org.eclipse.php.core.prefs .settings/org.eclipse.wst.common.project.facet.core.xml .settings/org.eclipse.wst.jsdt.ui.superType.container .settings/org.eclipse.wst.jsdt.ui.superType.name data/NewsInfo.txt *.txt *.txt data/NewsInfo.txt /data *.png *.jpg *.jpg *.txt data/NewsInfo.txt data/NewsInfo.txt data/NewsInfo.txt *.log /includes *.txt /photos *.jpg /photos data/NewsInfo.txt /data *.txt /data *.txt *.txt /data /data data/Eagles.txt data/HolesInOne.txt Eagles.txt HolesInOne.txt *.txt *.txt .project .settings/org.eclipse.php.core.prefs data/Eagles.txt data/HolesInOne.txt .project ·
Author   desktop
🌐
Eclipse Marketplace
marketplace.eclipse.org › free-tagging › gitignore
gitignore | Eclipse Plugins, Bundles and Products - Eclipse Marketplace | Eclipse Foundation
gitignore · Nodeclipse Git Addon · 26 · 0 · Install · Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client · Friday, January 15, 2021 - 10:13 by Paul Verest · Nodeclipse Git Addon associates *.git* files with TextEditor. Why? 1) Those files are often opened in external text editor, e.g.
🌐
Jmu
wiki.cs.jmu.edu › reference › eclipse › git
Using Git with Eclipse - JMU CS Wiki
August 21, 2025 - If you look at the project directory (outside of Eclipse) you will see that it is now empty, and if you look at the repository directory (again, outside of Eclipse) you will see that it now contains all of the directories and files that were in the project' directory. The easiest way to instruct Git to ignore files is to: ... You can also edit the .gitignore file (outside of Eclipse).
🌐
Eclipse
bugs.eclipse.org › bugs › show_bug.cgi
300964 – EGit seems to ignore .gitignore's contents - Bugs
Bugzilla – Bug 300964 EGit seems to ignore .gitignore's contents Last modified: 2015-11-04 08:01:34 EST ... This Bugzilla instance closed for new bug entry. Eclipse projects now use GitHub or Eclipse GitLab.
🌐
Sos-cer
sos-cer.github.io › projects › git-guide › git-ignore.html
Science of Software - Computing Education Research
An example .gitignore file that you should use as a starting-point in this course: # This rule ignores the contents of the bin/ build output directory (which includes .class files) bin/ # This rule ignores temporary files that end with ~ *~ # This rule ignores the contents of the .settings directory generated by Eclipse ...
Top answer
1 of 2
3

Disclaimer: .gitignores tend to accumulate entries over time and never have them removed; they're kind of cargo-cult files. It is not a bad practice to start with a minimal .gitignore in your project, covering only the tools you know and use, and add new entries when you become aware that they're required!

Here's some examples sourced from the .gitignore from the Nonprofit Success Pack, a very long-lived project that has seen many IDEs come and go, as well as a couple of other Salesforce.org projects. NPSP is built using a stack that includes Node.js and Python tools as well.

I've elided some entries that are obsolete or that I cannot explain.

Eclipse is end-of-lifed. You shouldn't have to worry about it anymore - if anyone on your team is still using Eclipse, tell them to stop!

.DS_Store                # Cruft from MacOS Finder
Thumbs.db                # Cruft from Windows Explorer

.project                 # I think this is Eclipse but not certain
.settings                # Ditto
salesforce.schema        # Eclipse
Referenced Packages      # Eclipse

build.properties         # Force.com Migration Tool

/IlluminatedCloud        # Illuminated Cloud
.idea/                   # IntelliJ IDEA (Illuminated Cloud)

venv/                    # Python
*.pyc                    # Python

.*.swp                   # Vim

*.sublime-project        # Sublime Text (used with MavensMate)
*.sublime-workspace      # Sublime Text (used with MavensMate)

.sfdx/                   # SFDX

.vscode/                 # Visual Studio Code

.cci/                    # CumulusCI

node_modules/            # Node.js (LWC, Prettier)
coverage/                # LWC coverage information
.localdevserver/         # SFDX/LWC dev
2 of 2
0
  1. Open the terminal in Org folder & type touch .gitignore
  2. It will automatically create a gitignore for saleforce orgs

Or you can copy the following

# Salesforce cache
.sf/
.sfdx/
.localdevserver/
deploy-options.json

# LWC VSCode autocomplete
**/lwc/jsconfig.json

# LWC Jest coverage reports
coverage/

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Dependency directories
node_modules/

# Eslint cache
.eslintcache

# Visual Studio Code
.vscode/                


# Windows system files
Thumbs.db
ehthumbs.db
[Dd]esktop.ini
$RECYCLE.BIN/

# Local environment variables
.env
🌐
GitHub
github.com › gregpriday › gitignore-php
GitHub - gregpriday/gitignore-php: GitIgnore PHP is a lightweight PHP library that parses and manages .gitignore files with advanced glob patterns, brace expansion, and Symfony Finder integration. · GitHub
GitIgnore PHP is a lightweight yet powerful PHP library for parsing and managing gitignore‑style rules. It provides a robust engine to interpret .gitignore patterns—including advanced brace expansion, recursive wildcard matching, negation ...
Author   gregpriday