Skip to content

Instantly share code, notes, and snippets.

@Lamparter
Created February 17, 2025 08:32
Show Gist options
  • Save Lamparter/79a0ccb1507f0e32c8e8024b73df3c9f to your computer and use it in GitHub Desktop.
Save Lamparter/79a0ccb1507f0e32c8e8024b73df3c9f to your computer and use it in GitHub Desktop.
Command to fix Git when you update the ignore with files already

This is a commmand to fix Git when you introduce a new ignore into your .gitignore file and want to delete all instances of that file.

git rm -r --cached .
@Lamparter
Copy link
Author

Lamparter commented Feb 17, 2025

It's a very simple fix but a pain when this happens.

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