.gitignore Generator
Type the names of the stacks and tools you use and get one combined .gitignore, with a labelled section for each template.
Use the tool
Why this tool exists
A new repository without a .gitignore soon collects node_modules folders, compiled classes, editor settings and operating system clutter, and removing files from history later is painful. Copying ignore rules from an old project works, but you usually paste too much or forget the IDE and OS entries.
This generator lets you list templates such as node, python, macos and vscode and returns them stacked in one file, each under its own heading. Covered stacks include Node, Python, Java, Go, Rust, .NET, Ruby, PHP, Swift, Unity and Terraform, plus macOS, Windows, Linux, JetBrains and VS Code. The templates are short starting points, not the full community lists, so review them against your build output before the first commit. Nothing is uploaded.
How to use it
- Type template names separated by commas or new lines, for example node, python, macos, vscode.
- Run the tool to build the combined file.
- Check each section against your project's build and cache folders.
- Save the result as .gitignore in the repository root.
Frequently asked questions
Which templates are available?
node, python, java, go, rust, dotnet, ruby, php, swift, unity, macos, windows, linux, jetbrains, vscode and terraform. A few aliases also work, such as csharp, idea and js. An unknown name shows the full list.
Are these the same as GitHub's templates?
No. They are shorter, hand-written lists of the most common patterns. They are a good start for a new project but may miss rules that the larger community templates include for your framework.
Will it stop files that are already tracked?
No. A .gitignore only affects untracked files. If something is already committed, remove it from the index with git rm --cached and then commit; the ignore rule will keep it out afterwards.
Should I commit lock files?
The generator does not ignore lock files such as package-lock.json. Applications normally commit them. The Rust template includes a comment about Cargo.lock, which libraries and binaries treat differently.