Skip to content

Instantly share code, notes, and snippets.

@GRArmstrong
Created October 30, 2017 15:34
Show Gist options
  • Save GRArmstrong/c558e4f9a0bdc8896fcb11270e4ed3c1 to your computer and use it in GitHub Desktop.
Save GRArmstrong/c558e4f9a0bdc8896fcb11270e4ed3c1 to your computer and use it in GitHub Desktop.
Clear out incorrect committed files from Git, matching extensions defined in .gitignore
git ls-files --ignored --exclude-standard | while read line; do git rm "$line"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment