Gitignore Generator

Select your tech stack and instantly generate a comprehensive .gitignore file — supports 20+ languages, frameworks, IDEs, and OS environments.

Select your stack
Languages
Frameworks & Tools
IDEs & Editors
Operating Systems
Select stacks above to generate your .gitignore
Custom rules (appended at the bottom):

How to Use

  1. Click the chips that match your project's tech stack — mix and match as many as you need (e.g., Node.js + React + VS Code + macOS).
  2. The .gitignore content updates instantly in the output box. Each section is clearly labeled with a comment header.
  3. Add any project-specific custom rules in the Custom rules box at the bottom — these are appended after the generated content.
  4. Click Copy to copy the content to your clipboard, then paste it into a .gitignore file at the root of your repository.
  5. Alternatively, click Download .gitignore to save the file directly — then move it to your project root.

About Gitignore Generator

A .gitignore file tells Git which files and directories to exclude from version control. Without one, you risk accidentally committing build artifacts (node_modules/, dist/), environment secrets (.env), OS metadata (.DS_Store), and IDE configuration clutter. A well-maintained .gitignore keeps your repository clean, reduces noise in pull requests, and prevents accidental exposure of sensitive data.

This generator covers popular patterns for 20+ ecosystems, based on community-maintained templates from the github/gitignore repository and established best practices. All processing happens in your browser — no data is sent anywhere.

Frequently Asked Questions

Do I commit .gitignore to my repository?

Yes — .gitignore should always be committed to your repository so that all contributors share the same ignore rules. It belongs at the root of your repo (or in subdirectories for more granular control). Only the global ~/.gitignore_global file (for personal IDE files) stays outside the repo.

Why isn't a file being ignored even after adding it to .gitignore?

Git only ignores untracked files. If a file is already tracked (committed), adding it to .gitignore won't stop Git from tracking changes. Remove it from the index first with git rm --cached <file>, then commit the change. The file will remain on disk but stop being tracked.

Should I ignore package-lock.json or Cargo.lock?

For applications: no — commit lockfiles to ensure reproducible builds for all developers and CI. For libraries/packages published to npm or crates.io: it's conventional to ignore them (or not commit Cargo.lock) so that consumers can resolve their own dependency tree. This generator follows the application convention by default.

Related Tools