Skip to content

Instantly share code, notes, and snippets.

@endymuhardin
Created April 2, 2011 14:28
Show Gist options
  • Save endymuhardin/899527 to your computer and use it in GitHub Desktop.
Save endymuhardin/899527 to your computer and use it in GitHub Desktop.
Sometime we accidentally commit files that should have been ignored. This command will remove it permanently from repository.
git filter-branch -f --index-filter 'git rm -r --cached --ignore-unmatch target .settings .project .classpath .springBeans \*/target\* \*/.settings\* \*/.springBeans \*/.project \*/.classpath ' HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment