Skip to content

Instantly share code, notes, and snippets.

@srwild
Created January 22, 2021 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srwild/f2ac892c9bce5a3eedbea53eaf0026ef to your computer and use it in GitHub Desktop.
Save srwild/f2ac892c9bce5a3eedbea53eaf0026ef to your computer and use it in GitHub Desktop.

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