.gitignore Generator

Select your OS, IDE, and frameworks to instantly generate a clean .gitignore file.

Free Runs in your browser

How to use

  1. 1 Search or select the technologies, frameworks, and tools used in your project (e.g. Node, Python, macOS, JetBrains).
  2. 2 The tool combines the official .gitignore templates for each selection.
  3. 3 Review the generated file in the output area.
  4. 4 Click Copy or Download to add it as the .gitignore file in your project root.

Key features

  • Based on official GitHub gitignore templates
  • Supports 50+ languages, frameworks, and tools
  • Combine multiple technologies in a single .gitignore file
  • Download or copy with one click

What is a .gitignore File?

A .gitignore file tells Git which files or folders to ignore when committing your project. Every line is a pattern — files matching that pattern are excluded from version control, keeping your repository clean of build artifacts, dependencies, configuration files with secrets, and operating system junk.

Without a proper .gitignore, you risk committing node_modules/ (thousands of files), .env files with API keys, compiled binaries, or IDE-specific settings like .DS_Store. Git itself doesn't prevent this — the .gitignore file is your gatekeeper.

This tool lets you select your OS, editor, and frameworks via checkboxes and instantly generates a complete, well-organised .gitignore file. You can then copy it to your clipboard or download it directly.

Common Use Cases

Node.js projects

Ignore node_modules/, npm-debug.logs, .env files, and dist/ build output. Keeps your repo lightweight and your secrets safe.

Python / Django projects

Exclude __pycache__/, *.pyc, .venv/, and .egg directories. Prevents compiled bytecode and virtual environments from being tracked.

Frontend frameworks (React, Vue)

Ignore build artifacts (dist/, build/), dependency directories, and editor config files. Keeps the repo focused on source code only.

DevOps & infrastructure

Avoid committing Terraform .tfstate files, Docker .env files, Helm chart archives, and SSH keys cloned into the repository.

Security & secrets management

Add .env, *.pem, *.key, and config files that contain API tokens. Use .env.example as a template instead.

Multi-platform teams

Prevent OS-specific files like .DS_Store (macOS) or Thumbs.db (Windows) from polluting the repository when team members use different systems.

IDE configuration isolation

Ignore .vscode/, .idea/, and other editor-specific folders so each developer can customise their environment without affecting the team.

New project scaffolding

When starting a project, generate the .gitignore from templates first — before the first commit. Avoids accidentally tracking generated files from the start.

Common .gitignore Patterns

The most frequently used patterns and what they match. Most of these are pre-configured in the tool's templates.

PatternMatchesExample
node_modules/Directory (trailing slash = directory only)Ignores the node_modules folder at any level
*.logAny file ending in .logIgnores access.log, error.log
build/build directory anywhere in the treeIgnores build/, app/build/
/.envLeading slash anchors to repo rootIgnores only .env at the root level
dist/Compiled output directoryIgnores dist/ from bundlers like Webpack, Vite
.DS_StoremacOS desktop metadata filePrevents macOS Finder settings from being tracked
!important/Negation — re-include a previously ignored pathKeep important/ even if parent is ignored

Global vs. Local .gitignore

The .gitignore file lives in your project repository and is shared with your team via Git. It should contain patterns that apply to everyone working on the project — build outputs, dependency directories, environment files.

For patterns that are specific to your machine (personal IDE settings, OS-specific files), Git supports a global exclude file at ~/.config/git/ignore (configurable via git config --global core.excludesFile). Patterns in your global ignore file apply to every repository on your machine without being committed.

Good .gitignore etiquette: commit patterns that benefit the whole team (build artifacts, dependency folders). Keep personal preferences in your global gitignore. Never commit secrets — use .env in your project's .gitignore and distribute a .env.example instead.