.gitignore and LICENSE Generator
Free .gitignore generator and license generator. Pick languages, editors and OS templates, choose MIT, Apache or GPL, and copy or download the files.
# ---- Node ---- node_modules/ npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* lerna-debug.log* .npm .pnpm-store/ .yarn/cache .yarn/install-state.gz dist/ coverage/ .nyc_output/ .eslintcache *.tsbuildinfo .env .env.local .env.*.local # ---- Next.js ---- .next/ out/ next-env.d.ts .vercel/ .turbo/ # ---- macOS ---- .DS_Store .AppleDouble .LSOverride Icon ._* .DocumentRevisions-V100 .fseventsd .Spotlight-V100 .TemporaryItems .Trashes .VolumeIcon.icns .com.apple.timemachine.donotpresent .AppleDB .AppleDesktop Network Trash Folder Temporary Items .apdisk # ---- VS Code ---- .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json !.vscode/*.code-snippets .history/ *.vsix .ionide/ *.code-workspace
What Is a Gitignore Generator?
A gitignore generator is a tool that builds the .gitignore file for a repository from a checklist of templates, so build output, dependencies, editor settings and operating-system litter never get committed. Each template holds the patterns one ecosystem needs: Node ignores node_modules/ and lockfile debug logs, Python ignores __pycache__/ and virtual environments, macOS ignores .DS_Store. Combining them by hand means copying from several sources and pruning duplicates; this tool does that merge for you and labels each block so the file stays readable.
The second tab is a license generator. It fills the year, holder and project name into MIT, Apache 2.0, GPL 3.0, BSD 3-Clause, ISC, MPL 2.0 or the Unlicense and gives you a LICENSE file plus the short header that goes at the top of source files. Both files are generated in the browser.
How to Generate a .gitignore File
- Tick a gitignore template for each language or framework in the repository, for example Node and Next.js.
- Add the operating systems and editors your team uses: macOS, Windows, VS Code, JetBrains.
- Type any project-specific patterns, one per line, into the Custom patterns box.
- Check the summary line for the template and pattern count, then copy the output or download it as .gitignore.
- Commit the file at the repository root. Patterns are relative to that directory.
Gitignore Template Reference
Every template is a curated list of 8 to 25 patterns. The most common ones and what they cover:
| Template | Key patterns | Why |
|---|---|---|
| Node | node_modules/, dist/, .env, *.tsbuildinfo | Installed packages and build output are reproducible |
| Python | __pycache__/, .venv/, *.egg-info/, .pytest_cache/ | Bytecode and environments are machine-specific |
| Go / Rust | bin/, vendor/, target/ | Compiled binaries and vendored dependencies |
| Next.js | .next/, out/, .vercel/ | Framework build cache and deployment metadata |
| macOS / Windows | .DS_Store, Thumbs.db, Desktop.ini | Finder and Explorer metadata files |
| VS Code / JetBrains | .vscode/* with !settings.json, .idea/, *.iml | Personal editor state, while shared settings stay |
| Terraform / Docker | *.tfstate, *.tfvars, compose.override.yml | State and secrets must not enter version control |
A leading ! re-includes a path that an earlier pattern excluded, which is how the VS Code template keeps settings.json while ignoring the rest of .vscode/.
Choosing a License With the License Generator
MIT is the default choice for libraries and small tools: anyone may use, copy and sell the code as long as the notice stays. ISC says the same in fewer words. BSD 3-Clause adds that the holder's name may not be used to endorse derived products. Apache 2.0 is MIT plus an explicit patent grant, which larger companies prefer. GPL 3.0 requires derivative works to remain open under the same license, and MPL 2.0 applies that rule only to the files you modify. The Unlicense waives copyright entirely.
The MIT license generator, like the others, needs only a year and a holder. For GPL 3.0 the project name appears in the header as well. Put the LICENSE file at the repository root; GitHub detects it and shows the license badge on the repository page.
Why Use a Gitignore Generator Before the First Commit
A gitignore generator matters most at the start of a project, because files that are committed before the rule exists stay tracked until you remove them with git rm --cached. Generating the file first means node_modules, build folders and .env secrets never enter history. Pair it with the README generator and the changelog generator, and a new repository has its three standard files in a couple of minutes.
Frequently Asked Questions
What does a gitignore generator do?
A gitignore generator writes the .gitignore file for you by combining ready-made pattern lists for the languages, frameworks, editors and operating systems a project uses. You tick Node, macOS and VS Code, and it emits the node_modules/, .DS_Store and .vscode/ rules with a labelled header per block, without duplicates.
Which gitignore template should I pick?
Pick one template per language or framework in the repo, plus the operating systems and editors your team uses. A Next.js app on a Mac with VS Code needs Node, Next.js, macOS and VS Code. Templates are deduplicated when combined, so over-selecting costs nothing except a longer file.
Can I add my own patterns?
Yes. Type one pattern per line in the Custom patterns box and they are appended under a # ---- Custom ---- header. Lines that already appear in a selected template are skipped.
How does the MIT license generator fill in the file?
It substitutes the year and copyright holder into the standard MIT text and shows both the LICENSE file and a two-line header for source files. ISC, BSD-3-Clause and the Unlicense work the same way; they are short enough to include in full.
Why does Apache 2.0 or GPL 3.0 show only a notice?
Those texts run to several thousand words, so the tool shows the official file header plus the canonical URL and offers a Fetch full text button that pulls the exact text from the SPDX license list. If the fetch fails, the notice and URL remain so you can paste the text yourself.
Does the tool send my project details anywhere?
No. Both files are assembled in your browser. The only network request is the optional fetch of a long license text from raw.githubusercontent.com when you ask for it.