.gitignore Generator
Build a clean .gitignore file for any language or framework.
What is a .gitignore file?
A .gitignore file tells Git which files and directories to ignore and not track. Every entry in a .gitignore file is a pattern that matches file paths relative to the repository root. When you run git status, git add, or git commit, Git checks the ignore patterns and excludes matching files from version control.
A well-configured .gitignore is essential for every project. Without it, you risk committing files that should never be in source control: dependency directories (node_modules/, vendor/), build artifacts (dist/, build/, *.pyc), environment files with secrets (.env, *.pem), IDE configuration (.idea/, .vscode/ in some cases), and operating system metadata (.DS_Store on macOS, Thumbs.db on Windows).
This generator uses the patterns from gitignore.io (also known as toptal/gitignore), the most comprehensive and maintained collection of gitignore patterns covering 500+ languages, frameworks, editors, and operating systems. Select your stack and download a ready-to-use .gitignore in seconds.
Common mistakes
- Adding already-tracked files — Adding a file to .gitignore does not remove it from tracking if it was already committed. Run
git rm --cached filenameto untrack it without deleting it. - Not committing .gitignore — The .gitignore file itself should be committed to the repository so all contributors use the same ignore rules.
- Wildcard abuse — An overly broad pattern like
*or*.jsoncan accidentally ignore important project files. Be specific with your patterns.