Tool guide
About this tool.
- A .gitignore lists patterns for files Git should leave untracked, such as dependencies, build output, logs and local secrets. It does not remove files from disk or stop tracking files that are already committed.
- Choose bundled starter templates for languages, frameworks, operating systems, editors and DevOps tools, optionally exclude exact generated lines, then append project-specific rules.
- Start a new repository with ignore rules for your stack, OS and editor without fetching templates from the internet.
- Combine several templates into one file with a heading per template and no repeated lines.
- Keep one file inside an ignored folder, or drop a template rule for something your project needs to commit.
Tick templates under Languages, Frameworks, Operating systems, Editors and DevOps, or pick a sample from Apply sample.
Enter template lines to leave out in Exclude generated rules, one exact line per row, such as dist/.
Add project patterns, comments and ! negations in Custom rules; they are appended under # Custom rules in the order you type them.
Copy the result or save .gitignore, and download gitignore-report.json to review the selected templates, exclusions and counts.
- Languages Node.js → # Node.js, then node_modules/, npm-debug.log*, yarn-debug.log*, yarn-error.log*, pnpm-debug.log*, .env and .env.*.local.
- Operating systems Linux + Editors Vim → # Linux with *~, .fuse_hidden*, .directory and .Trash-*, then # Vim with *.swp, *.swo and *.swn; the repeated *~ is written once.
- React / Vite, Exclude generated rules dist/, Custom rules dist/* and !dist/keep.txt → # React / Vite with .vite/ and *.local, then # Custom rules with dist/* and !dist/keep.txt.
- Node.js, Exclude generated rules .env, Custom rules .env and !sample.env → .env leaves the Node.js section but stays under # Custom rules, followed by !sample.env.
- Custom rules *.log, !keep.log, *.log → all three lines in that order, because a later pattern can override an earlier negation.
- Nothing selected → # Select one or more templates or add custom rules.
- Templates are bundled starter lists, not exhaustive recommendations. Sections follow the order of the template lists, not the order you tick them.
- A template line that already appeared in an earlier selected template is skipped, unless a ! negation came in between. Custom lines, comments and blank lines are preserved in order, including duplicates and escaped trailing spaces.
- Exclusions compare exact generated lines. They do not match globs or filenames and never remove custom rules.
- Output uses LF line endings with a trailing newline. Input is limited to 10,000 lines and 100,000 characters, and lines cannot contain NUL characters.