Created
January 3, 2019 00:40
-
-
Save vladris/2587917a975e243f62d143e102a33b9b to your computer and use it in GitHub Desktop.
Prune already deleted files from git history
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --diff-filter=D --name-only --pretty="format:" > ..\FILES | |
for /f "tokens=*" %%a in (..\FILES) do ( | |
git filter-branch --tag-name-filter cat --index-filter "git rm -r --cached --ignore-unmatch %%a" --prune-empty -f -- --all | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment