remove git cruft

2019-01-21T00:00:00.000Z

This article was also cross posted to dev.to feel free to drop in to give it a ♥ and leave comment.

cover: "./nathan-dumlao-523529-unsplash-crop.jpg" cover: "./rawpixel-1055774-unsplash.jpg"

inspiration

https://blog.ostermiller.org/git-remove-from-history

git log --all --pretty=format: --name-only --diff-filter=D | sed -r 's|[^/]+$||g' | sort -u
git filter-branch --tag-name-filter cat --index-filter 'git rm -r --cached --ignore-unmatch FILE_LIST' --prune-empty -f -- --all
rm -rf .git/refs/original/ 
git reflog expire --expire=now --all 
git gc --aggressive --prune=now
git push origin --force --all 
git push origin --force --tags
cd MY_LOCAL_GIT_REPO 
git fetch origin 
git rebase 
git reflog expire --expire=now --all 
git gc --aggressive --prune=now

Check out my otherblogs

.