git count-objects -v git gc --auto # this is enough to remove loose objects and repack repo git count-objects -v # more instruction git repack -Ad # Remove dangling objects from packfiles git prune # Remove dangling loose objects git gc --aggressive --prune=now --force || rm -f .git/objects/*/tmp_* && rm -f .git/objects/*/.tmp-* git count-objects -v