Gitignore Generator
Build a .gitignore file from templates for languages, frameworks, editors and operating systems. Enter the names you need, such as node, python, macos and vscode, and the tool joins their patterns into one file with a heading per template and without duplicate lines. Common aliases such as js, golang or intellij work too.
Frequently asked questions
Which templates are available?
node, nextjs, python, go, rust, java, maven, gradle, android, swift, dotnet, php, laravel, wordpress, ruby, terraform, unity, c, macos, windows, linux, vscode, jetbrains, vim, emacs and docker. Aliases such as typescript, golang, csharp, xcode, composer, rails, idea and cpp map to these.
How do I combine templates?
Separate the names with commas or spaces, for example node, macos, vscode. The templates appear in the order you list them, each under a comment with its name.
What happens to duplicate patterns?
A pattern that appears in several templates, such as dist/ or .env, is written only once, under the first template that contains it.
Where do the templates come from?
They were written for this tool and follow the patterns the common toolchains create, such as node_modules for npm or target for Cargo. Review the result and remove lines your project needs to commit, such as a lock file you do track.
Why is .env ignored in several templates?
.env files usually hold secrets such as API keys and database passwords, so they should not be committed. The Node.js template keeps .env.example, which is meant to be shared.
Does .gitignore remove files that are already committed?
No. Git only ignores untracked files. To stop tracking a file that is already committed, run git rm --cached on it and commit the change.