Skip to content

Instantly share code, notes, and snippets.

@iversond
Created October 4, 2022 17:29
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 iversond/abfd1db97ba0149af24c667de7bc6f9b to your computer and use it in GitHub Desktop.
Save iversond/abfd1db97ba0149af24c667de7bc6f9b to your computer and use it in GitHub Desktop.
Remove a large file that was added to the Git index
filename="terraform-provider-oci_v3.85.0_x4"
git filter-branch --prune-empty -d /tmp/scratch \
--index-filter "git rm --cached -f --ignore-unmatch $filename" \
--tag-name-filter cat -- --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment