Skip to content

Instantly share code, notes, and snippets.

@krassdanke
Created February 5, 2023 21:11
Show Gist options
  • Save krassdanke/6ba5b8f9890d6fc639c3d9780aa9ced1 to your computer and use it in GitHub Desktop.
Save krassdanke/6ba5b8f9890d6fc639c3d9780aa9ced1 to your computer and use it in GitHub Desktop.
git-eradicate (for video/parasite.avi)
# All credits goes to "Vi." @ stackoverflow
# https://stackoverflow.com/questions/1029969/why-is-my-git-repository-so-big
git filter-branch -f --index-filter \
'git rm --force --cached --ignore-unmatch video/parasite-intro.avi' \
-- --all
rm -Rf .git/refs/original && \
git reflog expire --expire=now --all && \
git gc --aggressive && \
git prune
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment