.gitignore Generator
Select languages, frameworks, IDEs, and OS to generate a complete .gitignore file.
Select Templates (4 selected)
Language
Framework
IDE
OS
Misc
Output
What Is a .gitignore File?
A .gitignore file tells Git which files and directories to exclude from version control. Without it, build artifacts, dependency folders, secret files, and OS-generated files pollute your repository. This generator lets you pick any combination of languages, frameworks, IDEs, and operating systems to produce a complete, annotated ignore file.
How to Use
- Select the languages, frameworks, IDEs, and OS you use in your project
- The generated .gitignore appears in the output panel, updated in real time
- Copy to clipboard or download as
.gitignore - Place the file at the root of your Git repository
Best Practices
- Always ignore
node_modules/,venv/, and other dependency directories - Never commit
.envfiles or any file containing secrets or API keys - Add your IDE directory (
.idea/,.vscode/) — unless you share settings intentionally - Use global gitignore (
~/.gitignore_global) for OS-level files like.DS_Store - The
!prefix un-ignores a specific file: e.g.!.vscode/extensions.json
FAQ
Why is Git still tracking a file I added to .gitignore?
Git only ignores untracked files. If a file was already committed, you must run git rm --cached <file> to remove it from the index, then commit. The file will remain on disk but will no longer be tracked.
Should I commit lock files like package-lock.json?
Yes for applications — lock files ensure reproducible installs. No for libraries — lock files in libraries force consumers to use your exact dependency versions. The Node.js template in this generator omits lock files; remove those lines if you want to commit them.
What is the difference between .gitignore and .gitkeep?
.gitignore excludes files. .gitkeep is a convention (not a Git feature) — an empty file placed inside an otherwise-empty directory so Git tracks the directory (Git does not track empty directories).