Gitignore Generator

Builds a .gitignore from templates for languages, frameworks and editors, and checks the finished file: what gets ignored and where the errors are.

Popular

Find a language, framework, editor, or operating system by name and click it: the file assembles instantly. Duplicate rules from different templates are removed, and conflicting rules are listed under the file.

Checking your own .gitignore

Paste the file and the paths from your project. For each path the page shows whether Git ignores it and which rule decided it, like the git check-ignore -v command. Write a folder path with a "/" at the end.

Common mistakes

  • a comment after a rule: in the line .env # secrets Git treats "# secrets" as part of the name, and .env gets into the repository;
  • a backslash: Git reads build\out as buildout;
  • a file inside an ignored folder cannot be restored: after logs/ the rule !logs/keep.txt does not work. Write logs/* instead of logs/;
  • a space at the beginning of a line becomes part of the name, and Git trims spaces at the end.

The file is already in the repository

.gitignore rules do not affect files that Git already tracks. Remove such a file from the repository while keeping it on disk with git rm --cached path, then make a commit.

Rate this tool

Help us get better

Other tools