GALAXY OF TOOLS

DEV SECTOR

.gitignore Generator

Pick languages, frameworks, editors and operating systems to get one clean, de-duplicated .gitignore file.

Quick start
Selected (4)
Node.jsVisual Studio CodemacOSWindows
4Templates
130Patterns
0Duplicates removed
1.96 KBFile size

Templates: github/gitignore (CC0-1.0), commit 0e5d690 of 2026-10-02. Comments were removed to keep this page small; 82 templates included.

Runs entirely in your browser. Nothing you enter or upload is sent to a server.

Build a .gitignore file from official templates

The .gitignore generator combines the templates GitHub maintains in its github/gitignore repository into a single file for your project. Search or browse 82 templates — languages such as Node.js, Python, Java, Go and Rust, frameworks such as Next.js, Laravel, Flutter, Unity and Unreal Engine, editors such as VS Code, JetBrains IDEs and Vim, and macOS, Windows and Linux — tick what your project uses, add your own lines, and download a ready .gitignore.

Templates are concatenated in a fixed order (languages, frameworks, editors, operating systems, tools, then your custom lines) under clear ### Name ### headings. Lines that appear in more than one template are removed only when doing so cannot change which files Git ignores, so the result is shorter but behaves exactly like the full concatenation.

The templates are dedicated to the public domain (CC0-1.0) by their authors, so you can use the output in any project. Everything is assembled in your browser.

How to use the .gitignore Generator

  1. Type in Search templates — “node”, “unity”, “pycharm” or “mac” all work — or press a Quick start button.
  2. Tick every template that applies: your language, framework, build tool, editor and the operating systems your team uses.
  3. Add project-specific patterns under Your own lines, such as /secrets/ or an exception like !config.example.json.
  4. Check the preview, then press Download .gitignore or Copy and save it as .gitignore in your repository root.

.gitignore Generator features

82 maintained templates

A curated set of the most used github/gitignore templates from commit 0e5d690 (2 October 2026), including community templates for Vue, Expo, Hugo, Phoenix, Jupyter, AWS CDK and Tauri.

Duplicate removal that is provably safe

A repeated pattern is dropped only if no ! negation between the two copies could match the same file name, so re-included files stay re-included.

Search by nickname

Templates are tagged with common names — IntelliJ, PyCharm and Android Studio find JetBrains; C# finds Visual Studio and .NET; React Native finds Expo.

Your lines win

Custom lines go last, because in a .gitignore the last matching pattern decides.

Remembers your choice

Your selection and custom lines are saved in this browser for next time.

.gitignore pattern syntax in one table

PatternMeaningExample matches
*.logNo slash: matches a name at any depthapp.log, logs/old/x.log
build/Trailing slash: directories onlythe build folder, not a file named build
/distLeading (or middle) slash: relative to this .gitignoredist at the root, not src/dist
**/temp**/ at the start: in any directorytemp, a/b/temp
logs/**Trailing /**: everything insideall files under logs
a/**/bZero or more directories in betweena/b, a/x/y/b
!keep.logNegation: re-include something an earlier line ignoredkeep.log stays tracked
\#file, \!xBackslash escapes a leading # or !files literally named #file, !x

Negation, order and the parent-directory trap

Git reads the file top to bottom and the last matching line wins, which is why *.log followed by !important.log ignores every log except one. Reverse the two lines and the exception is lost.

There is one rule negation cannot beat: Git does not look inside an ignored directory, so logs/ followed by !logs/keep.txt does not work. Ignore the contents instead — logs/* then !logs/keep.txt. The VS Code template uses exactly this trick: .vscode/* ignores the folder’s contents while !.vscode/settings.json keeps shared settings.

Already committed the files? Untrack them

A .gitignore only affects files Git is not yet tracking. If node_modules or a .env file is already committed, adding a pattern does nothing until you remove it from the index (your local copy stays on disk):

  • git rm --cached .env — stop tracking one file; git rm -r --cached node_modules for a folder.
  • git ls-files -ci --exclude-standard — list tracked files that your ignore rules would now exclude.
  • git check-ignore -v path/to/file — show which line in which file ignores a path.
  • Commit the result. If the file held a secret, rotate that secret — it remains in your history.
  • For editor and OS files you never want anywhere, use a global file: git config --global core.excludesFile ~/.gitignore_global.

.gitignore Generator FAQ

How do I create a .gitignore file?

Use this .gitignore generator to pick your languages, frameworks, editor and operating system, then download the result and save it as .gitignore (with the leading dot and no extension) in the root of your repository. Commit it like any other file.

Why is my .gitignore not ignoring a file?

Usually because the file was committed before the pattern existed. Run git rm --cached <file> and commit. If it still shows up, git check-ignore -v <file> tells you which rule applies — often a later ! line or a pattern with a leading slash that only matches at the root.

Is it safe to remove duplicate lines?

Here it is. A repeated line is dropped only when no negation between the copies could re-include the same name, so Git ignores exactly the same files. Untick “Remove duplicate lines” to get the plain concatenation.

Where do these templates come from?

From GitHub’s github/gitignore repository, released under CC0-1.0. Comment lines were stripped to keep the page small; open the source link under the preview to read the commented originals.

My download is called “gitignore” or “gitignore.txt”. What now?

Some systems hide or strip names that start with a dot. Rename the file to exactly .gitignore, or copy the text into a new file in your editor.

Should I commit editor folders like .idea or .vscode?

Share only what helps the team, such as recommended extensions or launch settings, and ignore personal state. The JetBrains and VS Code templates already follow that split; editor-only files belong in your global ignore file.

You might also need