.gitignore Generator

Check the languages, frameworks, and tools your project uses — get a ready .gitignore assembled from templates with duplicates removed. Copy it or download the file.

Pick your stack:
Generated .gitignore

Why you need a .gitignore. A .gitignore file tells Git which files and folders to leave untracked: dependencies (node_modules, vendor), build artifacts, logs, local configs with secrets (.env), and IDE/OS junk (.DS_Store, .idea). Without it, junk lands in your repo — bloating history, leaking passwords, and causing conflicts over other people's settings. The generator assembles a .gitignore from GitHub's vetted templates for your chosen stack.

FAQ

What should always go in .gitignore?

Dependencies (node_modules, vendor), environment files with secrets (.env), build artifacts (dist, build), logs, caches, and OS junk (.DS_Store, Thumbs.db). The rule of thumb: anything generated automatically or containing secrets should not be committed.

Why is node_modules not committed?

It is hundreds of megabytes of dependencies that one npm install restores from package.json. Storing it in git is pointless: it bloats the repo, and versions are already pinned in package-lock.json.

What if a file is already tracked by git?

Adding it to .gitignore is not enough — Git keeps tracking an already-committed file. Remove it from the index with git rm --cached <file> and commit; it stays on disk but leaves the repo.

Where do I put the .gitignore file?

Usually in the repository root — rules apply recursively to all subfolders. You can keep additional .gitignore files in nested folders for local rules, but for most projects a single root file is enough.

A free online .gitignore generator. Pick your project's languages, frameworks, IDEs, and operating systems — the tool assembles a ready .gitignore from GitHub's vetted templates, merges them, and automatically removes duplicate lines.

Popular stacks are available: Node, Python, PHP and Laravel, Go, Rust, Java, C/C++, .NET and Visual Studio, JetBrains (IntelliJ, PhpStorm), VS Code, plus macOS, Windows, and Linux. Copy the result to the clipboard or download it as a ready .gitignore file and drop it in your repo root.

Everything is assembled in the browser; nothing is sent to a server. The tool is handy at the start of a new project — get a correct .gitignore in a couple of clicks so dependencies, build artifacts, .env secrets, and IDE junk never reach your repository.

Related tools