gitignore.pro

Create the perfect .gitignore file

Select your tech stack, and we'll generate an annotated file with best practices.

1. Select Your Tech Stack

2. Copy Your Config File

# Select templates from the left to generate your .gitignore file

Quick Fix FAQ

Why are my files not being ignored?

This is the most common issue. It happens because Git is already tracking the files you want to ignore. To fix this, you need to clear Git's cache with the following commands:

git rm -r --cached .
git add .
git commit -m "fix: Untrack files"
How do I ignore an empty folder?

Git doesn't track empty folders. To force it to, place an empty file named .gitkeep inside the folder you want to keep. Then, add this to your .gitignore file to ignore everything else in that folder:

# Ignore all files in the 'logs' folder
logs/*

# But DO NOT ignore the .gitkeep file
!logs/.gitkeep