Gitignore Generator
Generate a .gitignore file from several language, framework, editor and operating-system presets. Add custom ignore and keep rules and review the complete file before downloading.
Keep an Exception in a Next.js Repository
Keep patterns are added after ignore patterns. A keep rule still needs its parent directories to be available.
Find & replace in input
Undo: Ctrl/Cmd+Z · Redo: Ctrl/Cmd+Shift+Z or Ctrl+Y. Up to 20 steps and 4 million retained characters in this tab. Clear discards history.
Gitignore Generator: how to use it
- Choose the presets your repository actually uses. Combine several languages, editors or operating systems when needed.
- Add custom ignore patterns and exceptions on separate lines. Set whether to show section comments.
- Generate .gitignore and review the complete preview. Copy the rules, download them as text, or extract the exact .gitignore file from the ZIP.
Limits and notes
Fourteen presets. Up to 1,000 lines or 100,000 characters per custom input. The generator omits exact repeats within runs of the same rule polarity. It retains repetitions across ignore and keep boundaries where the order may change behavior.
How your privacy works →Gitignore Generator: common questions
Should I add every language and editor preset?
Choose presets that match the repository. A broad rule such as build/ could also match a directory with source files. Review the generated lines before using them.
Where do my custom keep rules appear?
They follow the preset and custom ignore rules. Enter a path pattern with or without a leading !. The generator adds the marker where it is missing.
Will a generated rule hide a tracked file in Git?
Ignore rules apply to untracked files. Inspect tracked paths and any planned index changes in your own repository.