.gitignore Generator
Combine language, framework, editor & OS templates into one file.
Generate a clean .gitignore in seconds — search and add languages, frameworks, editors and operating systems (Node.js, Python, React, Next.js, Laravel, VS Code, IntelliJ, macOS, Windows and more) from one dropdown, and this tool merges their patterns into a single de-duplicated file. Add your own custom patterns alongside the generated templates, then copy or download. Templates are modelled on the widely-used github/gitignore reference set. Runs fully in your browser — nothing you select is uploaded.
How to use .gitignore Generator
Search and add technologies
Use the dropdown to add every language, framework, editor and OS your project touches — e.g. Node.js, React, VS Code and macOS.
Use the popular shortcuts
Click a popular chip to toggle a common stack on or off instantly, without opening the dropdown.
Add custom patterns
Type any extra folders or files you want ignored — one pattern per line — in the custom box.
Review the preview
The .gitignore preview updates instantly and de-duplicates lines that appear in more than one template.
Copy or download
Copy the text or download it as .gitignore, then place it in your project's root folder.
Understanding .gitignore
Pattern syntax
A .gitignore file uses simple glob patterns to tell Git which files to skip. Once you know these symbols, you can write your own rules with confidence:
*matches any characters within a single folder level**matches through any number of folders — **/logs matches a logs folder anywhere in the project?matches exactly one character!un-ignores a file, useful for keeping one file inside an otherwise ignored folder/at the start locks a pattern to the project root; at the end it matches folders only
Global gitignore
Some files — like .DS_Store or Thumbs.db — don't belong in any repo, no matter the project. Instead of adding them to every .gitignore, set one global file for your whole machine:
git config --global core.excludesfile ~/.gitignore_global
.gitignore vs .git/info/exclude
Both files ignore patterns, but they behave differently:
.gitignoretracked and shared with the whole team as part of the repository.git/info/excludelocal only — never committed, good for personal test files or editor settings nobody else needs
Why you should track .gitignore
Always commit your .gitignore file. It keeps every teammate on the same ignore rules, stops build output, dependency folders and secret files from slipping into a commit by accident, and keeps your repository clean and small.
Handling already-tracked files
Adding a pattern to .gitignore only blocks new files — it does nothing for files Git is already tracking. Untrack them first, then commit:
This removes the file from Git only — it stays safely on your computer.
git rm --cached <file> git rm -r --cached <folder> git commit -m "Remove tracked files now in .gitignore"
Frequently asked questions
What is a .gitignore file?
A .gitignore file tells Git which files and folders to leave untracked — build output, dependencies like node_modules, editor settings, OS clutter like .DS_Store, and secrets like .env. It keeps your repository clean and stops sensitive or generated files from being committed by accident.
How do I generate a .gitignore file for my project?
Search and select every language, framework, editor and operating system your project uses from the dropdown — for example Node.js, React, VS Code and macOS — and this tool instantly combines their patterns into one clean, de-duplicated .gitignore you can copy or download.
Where do I put the generated .gitignore file?
Save it as .gitignore (no filename, just the extension) in the root folder of your Git repository. Git reads it automatically from that point on — files already tracked before adding the pattern need to be untracked separately with git rm --cached.
Can I combine multiple templates, like Node.js and React?
Yes — that's the point of this generator. Select as many templates as you need and it merges them into a single file, automatically removing duplicate pattern lines so the result stays clean and readable.
Can I add my own custom ignore patterns?
Yes. Use the custom patterns box to add any extra files or folders — one per line, standard Git glob syntax like /uploads, *.local or secrets.json — and they're appended under their own ### Custom ### section.
Is this .gitignore generator free and does it store my data?
Yes, it's completely free and unlimited. Every template and pattern is assembled locally in your browser using plain JavaScript — nothing you select or type is sent to a server, logged or stored.
Related tools — Developer · Config file generators
- .env File Generator — Build a .env file from key/value rows, or a framework preset.
- .htaccess Generator — Force HTTPS, redirect www, enable gzip & caching — no hand-coding.