Feedback

Chat Icon

Learn Git in a Day

Everything you need, nothing you don't

Keep Junk Out of Your Repo
61%

Already Tracked? Here's the Fix

There's one catch: .gitignore only works on untracked files. If you've already committed a file and then add it to .gitignore, Git will continue tracking it.

To stop tracking a file that was already committed, you need to remove it from Git's index (but keep it on your disk):

git rm --cached 

Learn Git in a Day

Everything you need, nothing you don't

Enroll now to unlock all content and receive all future updates for free.