.gitignore for Bun
47 ignore rules for Bun, ready to copy into your repository.
Fast all-in-one JavaScript runtime and toolkit
The complete .gitignore for Bun
# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-09-17 17:01:12 UTC
# Technologies: Bun
### Bun ###
logs
# SQLite database
*.sqlite
# Node.js diagnostic reports
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
package-json.lock
# Process ID files
pids
# Process ID file
*.pid
node_modules.bun
# Random seed file
*.seed
# Process lock file
*.pid.lock
# Lerna debug logs
lerna-debug.log*
# Library coverage
lib-cov
# Log file
*.log
# Coverage directory
coverage
# LCOV coverage data
*.lcov
# TypeScript build info
*.tsbuildinfo
# NYC coverage output
.nyc_output
# npm debug logs
npm-debug.log*
# Grunt intermediate storage
.grunt
# Yarn debug logs
yarn-debug.log*
# Bower dependencies
bower_components
# Yarn error logs
yarn-error.log*
# node-waf configuration
.lock-wscript
# Compiled binary addons
build/Release
# Node.js dependencies
node_modules/
# JSPM packages
jspm_packages/
# npm cache directory
.npm
# ESLint cache
.eslintcache
typings/
.node_repl_history
*.tgz
# Rollup plugin cache
.rpt2_cache/
.yarn-integrity
# Environment variables
.env
# Rollup CJS cache
.rts2_cache_cjs/
# Rollup ES cache
.rts2_cache_es/
# Rollup UMD cache
.rts2_cache_umd/
# Cache directory
.cache
# Next.js build output
.next
.env.test
# Nuxt.js build output
.nuxt
dist
.cache/
# VuePress build output
.vuepress/dist
# Serverless framework
.serverless/
# FuseBox cache
.fusebox/
# Local DynamoDB
.dynamodb/
# Tern.js port file
.tern-port
What these Bun rules actually ignore
Every pattern below, and why it belongs in your .gitignore.
Logs
| Pattern | What it ignores |
|---|---|
logs |
Logs |
*.sqlite |
SQLite database |
package-json.lock |
package-json |
node_modules.bun |
bun deploy file |
lerna-debug.log* |
Lerna debug logs |
*.log |
Log file |
npm-debug.log* |
npm debug logs |
yarn-debug.log* |
Yarn debug logs |
yarn-error.log* |
Yarn error logs |
Diagnostic reports (https://nodejs.org/api/report.html)
| Pattern | What it ignores |
|---|---|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json |
Node.js diagnostic reports |
Runtime data
| Pattern | What it ignores |
|---|---|
pids |
Process ID files |
*.pid |
Process ID file |
*.seed |
Random seed file |
*.pid.lock |
Process lock file |
Directory for instrumented libs generated by jscoverage/JSCover
| Pattern | What it ignores |
|---|---|
lib-cov |
Library coverage |
Coverage directory used by tools like istanbul
| Pattern | What it ignores |
|---|---|
coverage |
Coverage directory |
*.lcov |
LCOV coverage data |
.nyc_output |
NYC coverage output |
TypeScript cache
| Pattern | What it ignores |
|---|---|
*.tsbuildinfo |
TypeScript build info |
Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
| Pattern | What it ignores |
|---|---|
.grunt |
Grunt intermediate storage |
Bower dependency directory (https://bower.io/)
| Pattern | What it ignores |
|---|---|
bower_components |
Bower dependencies |
.lock-wscript |
node-waf configuration |
Compiled binary addons (https://nodejs.org/api/addons.html)
| Pattern | What it ignores |
|---|---|
build/Release |
Compiled binary addons |
Dependency directories
| Pattern | What it ignores |
|---|---|
node_modules/ |
Node.js dependencies |
jspm_packages/ |
JSPM packages |
Optional npm cache directory
| Pattern | What it ignores |
|---|---|
.npm |
npm cache directory |
Optional eslint cache
| Pattern | What it ignores |
|---|---|
.eslintcache |
ESLint cache |
TypeScript v1 declaration files
| Pattern | What it ignores |
|---|---|
typings/ |
TypeScript v1 declaration files |
Optional REPL history
| Pattern | What it ignores |
|---|---|
.node_repl_history |
Optional REPL history |
Output of 'npm pack'
| Pattern | What it ignores |
|---|---|
*.tgz |
Output of 'npm pack' |
Microbundle cache
| Pattern | What it ignores |
|---|---|
.rpt2_cache/ |
Rollup plugin cache |
.rts2_cache_cjs/ |
Rollup CJS cache |
.rts2_cache_es/ |
Rollup ES cache |
.rts2_cache_umd/ |
Rollup UMD cache |
Yarn Integrity file
| Pattern | What it ignores |
|---|---|
.yarn-integrity |
Yarn Integrity file |
.env |
Environment variables |
.cache |
Cache directory |
.env.test |
Yarn Integrity file |
Next.js build output
| Pattern | What it ignores |
|---|---|
.next |
Next.js build output |
Nuxt.js build / generate output
| Pattern | What it ignores |
|---|---|
.nuxt |
Nuxt.js build output |
dist |
Nuxt.js build / generate output |
Gatsby files
| Pattern | What it ignores |
|---|---|
.cache/ |
Gatsby files |
.vuepress/dist |
VuePress build output |
Serverless directories
| Pattern | What it ignores |
|---|---|
.serverless/ |
Serverless framework |
FuseBox cache
| Pattern | What it ignores |
|---|---|
.fusebox/ |
FuseBox cache |
DynamoDB Local files
| Pattern | What it ignores |
|---|---|
.dynamodb/ |
Local DynamoDB |
TernJS port file
| Pattern | What it ignores |
|---|---|
.tern-port |
Tern.js port file |
How to use this .gitignore for Bun
- Copy the Bun 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.