Disk full - Wordpress .git objects taking up silly amount of space

From the WordPress application root (normally same as document root):

rm -rf .git/

Or from command-line, to remove + regenerate:

cpcmd -d DOMAIN wordpress:reconfigure DOMAIN SUBPATH '[git:0]'
cpcmd -d DOMAIN wordpress:reconfigure DOMAIN SUBPATH '[git:1]'

If WordPress is not installed within a subdirectory of a domain, then replace “SUBPATH” with ''.

Note: to regenerate if removed using rm -rf .git/ the “git” feature still needs to be reconfigured by first setting git:0, then git:1 due to an idempotency check.