Seems like my project is getting bigger and bigger with every git commit/push
. Is there a way to clean up my git folder?
Run:
git remote prune origin
Deletes all stale tracking branches which have already been removed at origin
but are still locally available in remotes/origin
.
git gc --auto
'G arbage C ollection' - runs housekeeping tasks (compresses revisions, removes loose/inaccessible objects). The --auto
flag first determines whether any work is required, and exits without doing anything if not.