Skip to content

Instantly share code, notes, and snippets.

@keithbloom
Created October 6, 2011 10:40
Show Gist options
  • Save keithbloom/1267102 to your computer and use it in GitHub Desktop.
Save keithbloom/1267102 to your computer and use it in GitHub Desktop.
Remove files which should be ignored from a git repsoitory
ld/
*.suo
*.user
bin
Bin
obj
_ReSharper*
*.csproj.user
*.resharper.user
*.suo
*.cache
TestResult.xml
#!/bin/bash
for f in $(git ls-files -i -X .gitignore)
do
git rm --cached $f
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment