Gitignore Generator

Build a .gitignore for your stack, and check whether a path would be ignored.

In the file: Node.js

.gitignore

1 template · 39 pattern lines
# Node.js
# Dependencies installed by npm, Yarn, pnpm or Bun
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
.pnpm-debug.log*
lerna-debug.log*
# Diagnostic reports Node writes to the working directory when it crashes
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
*.pid
*.pid.lock
*.seed
lib-cov/
# Coverage reports from c8, nyc or Jest
coverage/
*.lcov
.nyc_output/
.cache/
.parcel-cache/
.grunt/
bower_components/
jspm_packages/
web_modules/
# TypeScript's incremental build cache
*.tsbuildinfo
.eslintcache
.stylelintcache
# Tarballs written by npm pack
*.tgz
.node_repl_history
# Yarn's cache and install state; the five lines below re-include what has to be committed
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
# Yarn's Plug'n'Play files
.pnp.*
.npm/
.lock-waf*
# Native addons built by node-gyp
build/Release/
# Local environment files; commit .env.example instead
.env
.env.local
.env.*.local
  • Ignored: it sits inside "node_modules/", which "node_modules/" (Node.js) excludes.

Lines are applied top to bottom, and the last one that matches wins — which is why a line of your own can overrule a template. This one was read as a folder.

More in the yard