How do you remove a large file from the entire Git history?
AdvancedConceptGitHub features, history rewriting and scale
Answer
Rewrite with git filter-repo, then expire and gc so the objects are actually dropped, and force-push. Collaborators must re-clone or hard reset.
git filter-repo --strip-blobs-bigger-than 50M
git filter-repo --invert-paths --path assets/video.mp4
More on GitHub features, history rewriting and scale
What does a GitHub Actions workflow look like at a basic level?BeginnerWhat are GitHub environments and what protection do they offer?IntermediateWhat is a GitHub Release and how does it relate to a Git tag?BeginnerWhat are the permissions of `GITHUB_TOKEN` and how do you restrict them?IntermediateWhy do fork PRs get no secrets, and what is `pull_request_target`?AdvancedWhat is the difference between a GitHub fork and a clone?Beginner