If you have accidentally added huge binary files in a repo and you want to remove them, use the following git command:
Thanks fly to Sam Watkins for sharing this.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 \ | |
-c gc.rerereresolved=0 -c gc.rerereunresolved=0 \ | |
-c gc.pruneExpire=now gc "$@" |
Thanks fly to Sam Watkins for sharing this.