removes a large file from git commit history

PHOTO EMBED

Mon Jan 17 2022 00:54:51 GMT+0000 (Coordinated Universal Time)

Saved by @ainaimi

git filter-branch --force --index-filter \
  'git rm --cached --ignore-unmatch folder/large_file.ext' \
  --prune-empty --tag-name-filter cat -- --all
content_copyCOPY

Need to tell git exactly where the file is located. Be sure to commit once this runs. And then add the file to .gitignore so it doesn't happen again.

https://www.deployhq.com/git/faqs/removing-large-files-from-git-history