9/01/2022

Delete 100mb file in all committed history in git

 Let's say the problem which is more than 100mb file is "shit.pt"

And you want to delete already committed in git history and you don't push and reverting.

Then this is save you


> git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch SHIT.bin' --prune-empty --tag-name-filter cat -- --all


Change SHIT.bin file name as your problem guy. 

And add .gitignore and commit & push.

Thank you.

www.marearts.com



No comments:

Post a Comment