# .gitignore Generator

> Pick your languages, frameworks, IDE and OS to build one clean .gitignore with duplicate rules removed. Copy it or download the file. Free.

- Page: https://mondaytool.com/tools/gitignore-generator
- Category: developer-tools
- Price: free, no sign-up. Most tools run in the browser, so input is not uploaded.
- Use it: open https://mondaytool.com/tools/gitignore-generator. It is an interactive web page; this file is its documentation.

Last updated: 14 October 2026

## Generate a .gitignore file for your tech stack

This **.gitignore generator** builds a ready-to-use .gitignore file from the languages, frameworks, editors and operating systems you select. It joins the templates into one file and removes duplicate rules, so you get a short, clean list. Use it when you start a new repository or when build folders and secret files keep showing up in `git status`.

## How to use it

1. Tick the stacks you use. Node.js, VS Code and macOS are selected by default.
2. Use **Select all** or **Clear all** to change many at once. The counter shows how many are selected.
3. Click **Generate .gitignore**. The file appears with a count of its rules.
4. Click **Copy**, or **Download** to save it as `.gitignore`.
5. Place the file in the root folder of your Git repository and commit it.

## Available templates

| Group | Stacks |
| --- | --- |
| Frontend | Node.js, React / Next.js |
| Backend | Python, Django, PHP / Laravel, Ruby |
| Languages | Go, Java, Rust, C / C++, .NET / C# |
| IDE / OS | VS Code, JetBrains IDEs, macOS, Windows, Linux |
| DevOps | Docker, Terraform |

## How it works

Each stack has a short template of common rules, such as `node_modules/`, `__pycache__/`, `target/`, `.env` or `.DS_Store`. The generator adds the selected templates in a fixed order, each under its own `# comment` header. If a rule already appeared in an earlier section, it is left out of the later one. For example, `build/` appears under Node.js and is skipped under React / Next.js. The file is built in your browser and nothing is uploaded.

If you change your selection, the output hides until you click Generate again, so the file always matches your choices.

## Tips

- Review the file before you commit. The Rust template ignores `Cargo.lock`, which suits libraries, but applications usually commit it.
- The Docker template ignores `.dockerignore`. Delete that line if you want to keep your .dockerignore in the repository.
- The VS Code template ignores the whole `.vscode/` folder. Remove it if your team shares editor settings.
- A .gitignore does not affect files Git already tracks. Run `git rm --cached ` to stop tracking them.

## Frequently asked questions

### Where do I put the .gitignore file?

Put it in the root folder of your repository, next to the `.git` folder. Git applies its rules to that folder and every folder below it.

### Can I combine several stacks in one file?

Yes. Select as many as you need. The tool merges them into one file and keeps each rule only once.

### Why is my .env file still showing in Git?

It was probably committed before the rule was added. Remove it from tracking with `git rm --cached .env`, then commit. The rule will keep it out from then on.
