📁

.gitignore Generator

Build a .gitignore file from common stack templates

🧑‍💻 Developer ToolsFreeRuns in your browser
29 lines

Save the result as .gitignore in your repository root. Already tracked files keep being tracked until you run git rm --cached.

About the .gitignore Generator

The .gitignore Generator combines ready-made ignore rules for the stacks and tools you use. Select your frameworks and editors, and it produces a single file with commented sections.

Start a repository with ignore rules in place rather than adding them after secrets appear in history. Once a credential is committed, rotating it is safer than trying to scrub the commit.

  • ✓Templates for common languages and frameworks
  • ✓Editor and operating system entries
  • ✓Secrets and env files kept out of git

How to use the .gitignore Generator

  1. 1

    Select the stacks and tools your project uses.

  2. 2

    Review the generated rules.

  3. 3

    Copy the file into your repository root as .gitignore.

Frequently asked questions

Why is my ignored file still tracked?+

A rule only affects untracked files. Remove the file from the index with git rm --cached path/to/file, then commit the removal.

Should I commit a lockfile?+

For applications, yes, because it pins dependency versions. For libraries the convention varies, so check your ecosystem before ignoring it.

Save .gitignore Generator to your favorites, or keep browsing developer tools.

Browse all 35 developer tools →