Skip to content

Instantly share code, notes, and snippets.

@llh911001
Last active September 26, 2015 01:58
Show Gist options
  • Save llh911001/19d7b21df7d2f203deb1 to your computer and use it in GitHub Desktop.
Save llh911001/19d7b21df7d2f203deb1 to your computer and use it in GitHub Desktop.
Really delete loosed files in git repo
git filter-branch --tag-name-filter cat --index-filter 'git rm -r --cached --ignore-unmatch FILE_NAME' --prune-empty -f -- --all
git reflog expire --expire=now --all
git gc --aggressive --prune=now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment