Skip to content
framework20 active rulesVerified 2026-09-30

Salesforce .gitignore Template

Standard Salesforce gitignore template from upstream github/gitignore collection. Generated and merged deterministically with upstream GitHub repository patterns to keep your repository clean of package directories, temporary build artifacts, and local environment files.

Interactive Stack Generator

Open in Full Generator
Search for templates
Quick add:
Selected1
Salesforce
Selected Templates (1)
.gitignore
### Salesforce ###
# This file is used for Git repositories to specify intentionally untracked files that Git should ignore.
# If you are not using git, you can delete this file. For more information see: https://git-scm.com/docs/gitignore
# For useful gitignore templates see: https://github.com/github/gitignore
# Salesforce cache
.sf/
.sfdx/
.localdevserver/
deploy-options.json
.localdev
# LWC VSCode autocomplete
**/lwc/jsconfig.json
# LWC Jest coverage reports
coverage/
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Eslint cache
.eslintcache
# Windows system files
Thumbs.db
ehthumbs.db
[Dd]esktop.ini
$RECYCLE.BIN/
# Salesforce Analyzer results
sca-results.csv
sfca_results.json
# Local environment variables
.env
20 rules1 template41 lines
Deterministic

Raw Salesforce .gitignore

Crawlable upstream source template
salesforce.gitignore40 lines
# This file is used for Git repositories to specify intentionally untracked files that Git should ignore.
# If you are not using git, you can delete this file. For more information see: https://git-scm.com/docs/gitignore
# For useful gitignore templates see: https://github.com/github/gitignore
# Salesforce cache
.sf/
.sfdx/
.localdevserver/
deploy-options.json
.localdev
# LWC VSCode autocomplete
**/lwc/jsconfig.json
# LWC Jest coverage reports
coverage/
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Eslint cache
.eslintcache
# Windows system files
Thumbs.db
ehthumbs.db
[Dd]esktop.ini
$RECYCLE.BIN/
# Salesforce Analyzer results
sca-results.csv
sfca_results.json
# Local environment variables
.env

Key Pattern Breakdown

Build & Compilation Artifacts

Ignores compiled binaries, intermediate object files, and build output directories generated during development.

$RECYCLE.BIN/

Environment & Secrets

Prevents leaking sensitive local credentials, API keys, database URLs, and environment configuration files.

.env

Cache & Temporary Files

Ignores compiler caches, test runner coverage data, and transient temporary scratch files.

coverage/*.lognpm-debug.log*yarn-debug.log*yarn-error.log*.eslintcache

System & Editor Files

Filters out operating system metadata and workstation-specific editor configuration folders.

Thumbs.dbehthumbs.db

Source & Verification

License:: CC0-1.0

Place this file in the root directory of your project as .gitignore. Changes take effect on newly added or untracked files.