Skip to content

Instantly share code, notes, and snippets.

@jstrassburg
Last active January 12, 2025 21:16
Show Gist options
  • Save jstrassburg/04320de09bc4da36d38c to your computer and use it in GitHub Desktop.
Save jstrassburg/04320de09bc4da36d38c to your computer and use it in GitHub Desktop.
Remove files added to .gitignore but on the remote repository
git rm --cached $(git ls-files -i -c --exclude-from=.gitignore)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment