Code · Made a little simpler

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.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device
Language and framework
Editor
Operating system

Keep patterns are added after ignore patterns. A keep rule still needs its parent directories to be available.

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.

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

Gitignore Generator: how to use it

  1. Choose the presets your repository actually uses. Combine several languages, editors or operating systems when needed.
  2. Add custom ignore patterns and exceptions on separate lines. Set whether to show section comments.
  3. 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.

Guides