Friday, February 28, 2014

Removing deleted files from git

If you have accidentally added huge binary files in a repo and you want to remove them, use the following git command:
git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 \
-c gc.rerereresolved=0 -c gc.rerereunresolved=0 \
-c gc.pruneExpire=now gc "$@"
view raw GitCleanUp hosted with ❤ by GitHub

Thanks fly to Sam Watkins for sharing this.

No comments: