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

Preconfigured with Salesforce
Search for templates
Quick add:
Selected1
Salesforce
Selected Templates (1)
.gitignore
20 rules
### 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
41 lines•UTF-8
Deterministic

Raw Salesforce .gitignore

Crawlable upstream source template
salesforce.gitignore•40 lines•UTF-8
# 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 Outputs & Compiled Artifacts

Generated binary files, compilation targets, and distribution bundles that can be reliably reproduced from source.

$RECYCLE.BIN/

Environment Secrets & Local Overrides

Local environment configurations, secrets, and credentials intended to protect developer-specific settings from exposure.

.env

Execution Caches & Runtime Logs

Diagnostic logs, runtime metadata, test coverage reports, and incremental compiler caches that cause noisy repository diffs.

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

Operating System & Workspace Files

Editor-specific workspace configuration and OS filesystem metadata generated automatically by host operating systems.

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.