git remove file from history
$ git rm --cached giant_file
# Stage our giant file for removal, but leave it on disk
git remove file from history
$ git rm --cached giant_file
# Stage our giant file for removal, but leave it on disk
remove file history from git
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch path_to_file" HEAD
delete a file from repo history
$ git filter-branch --force --index-filter \
"git rm --cached --ignore-unmatch PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA" \
--prune-empty --tag-name-filter cat -- --all
> Rewrite 48dc599c80e20527ed902928085e7861e6b3cbe6 (266/266)
> Ref 'refs/heads/main' was rewritten
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us