Always Ignore These
# Dependencies
node_modules/
vendor/
# Build output
dist/
build/
.next/
out/
# Environment / secrets
.env
.env.local
.env.*.local
# OS files
.DS_Store
Thumbs.db
# Logs
*.log
npm-debug.log*
# IDE (personal settings only)
.idea/
*.swp
How to Use It
1
Open the tool
Go to Dev Utilities and scroll to the .gitignore Generator.
2
Select your stack
Choose the languages (Node.js, Python, Java), frameworks (React, Django, Spring) and OS environments (macOS, Windows, Linux) your project uses.
3
Generate
Click Generate to combine the templates into a single merged .gitignore file.
4
Save as .gitignore
Copy the output and save it as .gitignore in the root of your repository.
Pro Tips
💡Commit .gitignore early — before adding dependencies. Once
node_modules/ is tracked, you need git rm -r --cached node_modules to untrack it.💡Never commit
.env files. Use .env.example with placeholder values as documentation of required environment variables.💡Use a global gitignore for OS and editor files:
git config --global core.excludesfile ~/.gitignore_global. This keeps project-specific .gitignore clean.Frequently Asked Questions
What is a .gitignore file?
A file that tells Git which files and directories to ignore — preventing build artifacts, dependencies, secrets and OS files from being committed.
Where should I put it?
In the root of your repository. Rules apply to the whole repo. You can add additional .gitignore files in subdirectories for directory-specific rules.
How do I untrack a file already committed?
git rm --cached <file> stops tracking without deleting the local file. Then add it to .gitignore and commit the change.What should always be in .gitignore?
node_modules/, build/dist output, .env files, OS files (.DS_Store), IDE personal settings, and log files.Generate your .gitignore now
Open the .gitignore Generator and get a complete ignore file for your stack — free, no login required.
Open .gitignore Generator →