.gitignore

Gitignore Generator

Tick the technologies and systems your project uses, put the groups in the order you want, add any custom rules, and copy or download a merged .gitignore with duplicates removed. Every rule in every group is visible before you use it.

Back

1. Rule groups

Stored on this page
Choose groups

Order of selected groups

No groups selected yet.

    2. .gitignore

    Choose rule groups or add custom rules.

    The download is named .gitignore, but most browsers drop the leading dot (Chrome saves “gitignore”; others may save “_gitignore”). Rename the file to .gitignore.

    About this tool

    About Gitignore Generator

    Gitignore Generator builds a .gitignore file from rule groups for Node.js, Python, PHP, Java, Visual Studio Code, JetBrains IDEs, macOS, Windows, Linux, logs and environment files, plus your own rules. Groups are merged in the order you choose, and duplicate rules are removed while keeping a sensible order.

    A good .gitignore keeps dependencies, build output, editor settings, OS clutter and secrets out of a repository. Combining several sets by hand usually leaves duplicates and gaps.

    How to use

    Step by step

    1. Tick the rule groups that match your project and tools.
    2. Expand a group to review its rules if you like.
    3. Reorder or remove selected groups.
    4. Add any custom rules, one per line.
    5. Copy the output or download the .gitignore file.
    Key features

    What it offers

    • Eleven transparent rule groups stored on the page
    • Group order you control
    • Duplicate rules removed, with negation-aware handling
    • Custom rules treated as plain text
    • Optional heading comment for each group
    • Copy and download as .gitignore
    Best practices

    Tips for best results

    • Commit .gitignore early, before adding other files.
    • Never commit real secrets; ignore .env files and keep an example file.
    • Ignore build output rather than source files.
    • Use git rm --cached for files that were committed before being ignored.
    Benefits

    Why people use it

    Transparent

    See every rule before using it.

    Clean

    No duplicate lines.

    Flexible

    Reorder and add your own rules.

    Private

    Generated in your browser.

    FAQ

    Common questions

    They are stored in this page, not downloaded. Each group’s rules can be expanded under its checkbox so you can see exactly what will be added before you use it.
    When groups share a rule — such as build/ in Python and Node.js — it is written once, where it first appears. A repeat is kept only when a negation rule (starting with !) added in between could re-include files that the rule matches, because the later copy then changes the result.
    Yes. Selected groups appear in a list where you can move them up or down or remove them. The output follows that order, with your custom rules at the end.
    No. They are treated as plain text and added as written (trailing spaces trimmed, blank lines skipped, # comments kept). Nothing is run or compared against a repository.
    Browsers often refuse file names that start with a dot. Chrome, for example, saves it as “gitignore”, and other browsers may use “_gitignore”. Rename the file to .gitignore after downloading.
    The Environment files group ignores .env and .env.* but keeps .env.example and .env.sample, which usually hold placeholder values. Check that no real secrets are in them.
    No. It only affects untracked files. Files that are already committed stay tracked until you remove them from the index, for example with git rm --cached.
    Private by design

    This runs entirely in your browser

    No file or text you enter here is uploaded. Encoding and decoding happen on your device using native browser APIs — close the tab and nothing remains on a server.

    Install Toolisco Add it to your device for offline, one-tap access.