Common issues
.git/
grew excessively large
By inspecting dir size with
du -h -d 1 | sort -n
du -a --max-depth=1 | sort -n
we find .git/objects/pack
to have grown a lot in size probably due to large binary files (needing to be updated often by git).
Solution:
Repack the object files and garbage collecting unreachable/dangling objects by (suggested by Linus Torvalds himself):
git repack -a -d -f --depth=250 --window=250
which is much cleaner than doing git gc --aggressive --prune
.
On StackO: https://stackoverflow.com/a/5613380/9731176