Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

Get gitignore to ignore

Sometimes git doesn't ignore files that it has been tracking when you declare them in .gitignore. After you put something in .gitignore and commit it and it still tracks those files, run these series of commands.

git rm -r --cached .
git add .
git commit -m ".gitignore is now working"

Adopt, don't shop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment