Skip to content

.gitignore Generator

Embed

Paste this where you want .gitignore Generator on your site. Adjust the height to fit.

<iframe src="https://www.browserutils.dev/embed/gitignore-generator/" width="100%" height="500" frameborder="0" loading="lazy" title=".gitignore Generator"></iframe>
<p style="font-size:12px;margin:4px 0 0"><a href="https://www.browserutils.dev/tools/gitignore-generator/">.gitignore Generator</a> by BrowserUtils</p>

Generate .gitignore files from templates.Runs in this tab.

# Select templates above to generate .gitignore

How to use .gitignore Generator

  1. Tick one or more templates: Node.js, Python, Java, Go, Rust, macOS, Windows, Linux, IDE - VS Code, IDE - JetBrains, and IDE - Vim.
  2. Read the Output. Each ticked template is a commented section. Untick a box to drop that section.
  3. Click Copy. There is no search box and no place to paste a stack name.

What the checkboxes write

Tick a template and that section is appended. Untick it and the section goes away. The list is fixed: Node.js, Python, Java, Go, Rust, macOS, Windows, Linux, IDE - VS Code, IDE - JetBrains, and IDE - Vim. There is no search box.

Node.js, macOS, and IDE - VS Code

# Node.js
node_modules/
dist/
build/
.env
.env.local
.env.*.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.npm
.yarn-integrity

# macOS
.DS_Store
.AppleDouble
.LSOverride
._*
.Spotlight-V100
.Trashes

# IDE - VS Code
.vscode/
*.code-workspace
.history/

Python and IDE - JetBrains

# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
env/
venv/
.venv/
*.egg-info/
dist/
build/
.eggs/
*.egg
.mypy_cache/
.pytest_cache/

# IDE - JetBrains
.idea/
*.iml
*.iws
*.ipr
out/

The same pattern can show up in more than one section. dist/ and build/ are in both Node.js and Python.

Read two lines before you commit the file. The Rust template includes Cargo.lock. Applications usually commit that file. Libraries often ignore it. The Go template includes go.sum, and that file should usually be committed.

gitignore.io has a much longer catalog. This page is a short built-in list you can copy as a starting .gitignore.

Next step

Questions

What gitignore template does this generate?
A starting file from the checkboxes on the page. Node.js, macOS, and IDE - VS Code together produce three sections: # Node.js (including node_modules/ and .env), # macOS (including .DS_Store), and # IDE - VS Code (including .vscode/). Python and IDE - JetBrains include __pycache__/, venv/, and .idea/.
Is this gitignore.io?
gitignore.io (now hosted by Toptal) has a large searchable catalog. This page has the eleven templates listed above and no search field. Use it as a first .gitignore, then add project-specific lines.
Should I commit Cargo.lock or go.sum?
The Rust template includes Cargo.lock, which applications usually commit and libraries often ignore. The Go template includes go.sum, which should usually be committed. Delete those lines when they do not match the project.

More in DevOps & Config

All 16 devops & config