Productivity and Utilities

Gitignore Generator

Build a .gitignore file from the languages, tools and systems your project uses.

Languages
Tools and systems

One pattern per line, such as secrets.json or *.local. They are added at the end.

These lists are short starting points, not complete. Check them against the files your own project makes before you rely on them. A .gitignore only affects files Git is not tracking yet. To stop tracking a file that was already committed, remove it from the index with git rm --cached. Do not commit passwords or keys, and ignoring a file does not remove it from past commits.

Next step

How to use the gitignore generator

  1. Tick the languages you use, such as Node.js or Python.
  2. Tick the tools and systems that make files you do not want to commit, such as macOS, Windows, an editor or Docker.
  3. Add your own lines for files only your project makes. One pattern per line.
  4. Copy the file or download it as .gitignore, then place it at the top of your repository.

Node.js on a Mac

Ticking Node.js and macOS gives a file with a Node.js group that includes node_modules/, log files, coverage/ and .env, and a macOS group that includes .DS_Store. Each group starts with a comment line naming it.

If you add node_modules/ again in the extra lines, it is removed from the output as a repeat, and the status line says how many repeats were dropped.

How a .gitignore works

Each line is a pattern. A name such as .DS_Store matches a file with that name in any folder. A trailing slash such as dist/ matches only folders. A star such as *.log matches any file ending in .log. A line beginning with ! turns an earlier pattern off for the file it matches, and a line beginning with # is a comment.

Patterns apply to files Git is not already tracking. If you committed a file before ignoring it, Git keeps tracking it until you remove it from the index with git rm --cached and commit the change. Ignoring a file also does not remove it from earlier commits, so never commit passwords or keys in the first place.

About these lists

The lists here are short starting points written for this tool. They are not copies of any published collection and they are not complete. A framework or build tool may create other files, and a team may want to track some files this tool ignores, such as a lock file or a shared editor setting. Read the result and adjust it to your project.

Files are combined in the order of the groups, and repeated lines are removed so each pattern appears once. The page runs in your browser and nothing is uploaded. A README for the same project can come from the README generator, and web server files from the htaccess redirect generator and the robots.txt generator.

Assumptions and limits

  • Each group is a short list of common patterns, not an official or complete one.
  • Repeated lines across groups are removed, keeping the first one.
  • Your own lines are added at the end exactly as you type them, with trailing spaces removed.
  • The file only affects untracked files in the folder where it is placed and below it.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

Where do I put the .gitignore file?

Put it in the top folder of your repository, next to the .git folder. You can also add more .gitignore files in subfolders for rules that apply there.

Why is my file still tracked after I ignored it?

Git keeps tracking files that were committed before. Run git rm --cached on the file, commit, and from then on the pattern will apply.

How do I ignore a file but keep one exception?

Add the exception on a later line with an exclamation mark in front, such as !.vscode/settings.json after the line that ignores the folder contents.

Does a .gitignore keep secrets safe?

No. It only stops new files being added. A secret already committed stays in the history, so change it and keep secrets out of the repository.