Skip to content

Instantly share code, notes, and snippets.

@marcboeker
Created October 15, 2014 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcboeker/e2f49c013f1b7168bb38 to your computer and use it in GitHub Desktop.
Save marcboeker/e2f49c013f1b7168bb38 to your computer and use it in GitHub Desktop.
Remove file or directory from Git
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch imgs" HEAD
git filter-branch --tree-filter 'rm -fr imgs' HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment