Skip to content
Toolcroft

.gitignore Generator - Create .gitignore Files Instantly

Developer Tools

Generate .gitignore files for Node, Python, Java, Go, Rust, and 15+ other languages, frameworks, and IDEs. Combine multiple templates in one click.

Languages

Frameworks

IDEs

Operating Systems

35 lines

How to use this tool

  1. Select the languages, frameworks, and IDEs you use in your project.
  2. The combined .gitignore content appears instantly.
  3. Click "Copy" or "Download" to save the file.

How .gitignore works

A .gitignore file tells Git which files and directories to leave untracked. Git checks the file on every git status and git add operation. Patterns are matched against paths relative to the location of the .gitignore file.

Pattern syntax

  • *.log - ignore all .log files anywhere
  • /build/ - ignore only the top-level build/ directory
  • node_modules/ - ignore any node_modules directory at any depth
  • !important.log - negate a pattern (always track this file)
  • **/*.map - ignore any .map file at any depth
  • doc/**/*.txt - all .txt files under doc/

Already-tracked files

Adding a file to .gitignore does not automatically untrack it if Git is already tracking it. You must run:

git rm --cached <file>

to stop tracking a previously-committed file while keeping it on disk.

Global gitignore

For editor temp files and OS-specific files you never want tracked in any repository, use a global gitignore file. Configure it once:

git config --global core.excludesfile ~/.gitignore_global

Add entries like .DS_Store, Thumbs.db, .vscode/, *.swp (Vim swap files). This avoids polluting project-level .gitignore files with personal tooling exclusions.

Negation patterns

A pattern starting with ! negates a previous pattern - the file is tracked even if it would otherwise be ignored. Order matters: a negation must come after the pattern it overrides.

*.log
!important.log   # This IS tracked despite *.log rule above

A directory cannot be re-included if its parent is already ignored; you must unignore the parent first.

Frequently asked questions

What is a .gitignore file?

A .gitignore file tells Git which files and directories to ignore in a project, preventing generated files, dependencies, and secrets from being committed.

Can I combine multiple templates?

Yes. Select as many languages, frameworks, and IDEs as you like - the tool merges them into one file and removes duplicate entries.

Browse all developer tools