Compose a .gitignore from templates for languages, frameworks, editors and operating systems.
Loading tool
About .gitignore Generator
Builds a .gitignore file by combining templates for languages, frameworks, tools, operating systems and editors, such as Node, Next.js, Python, Go, Rust, Java, Swift, Flutter, Terraform, Docker, Hardhat, Foundry, macOS, Windows, VS Code and JetBrains. Sections appear in the order you select them, rules repeated across templates are kept only once, and you can add your own rules in a final custom section. The result can be copied or downloaded.
Common uses
- Start a new repository with a sensible .gitignore
- Combine rules for a monorepo that mixes several languages
- Keep .env files and secrets out of version control
- Add OS and editor files like .DS_Store or .idea to an existing project
FAQ
- Why is a file still tracked after I added it to .gitignore?
- .gitignore only affects untracked files. Run 'git rm --cached <file>' (or -r for a folder) and commit to stop tracking it.
- Where should the .gitignore file go?
- Usually in the repository root. You can also put .gitignore files in subdirectories; their patterns apply relative to that directory.
- Should editor and OS files go in the project .gitignore?
- Many teams add them to the project file for convenience. Alternatively, each developer can put them in a global ignore file set with 'git config --global core.excludesFile'.