Interview Prep/Git & GitHub/Repository Health, Size and Performance

`error: unable to create temporary file: No space left on device` followed by `fatal: failed to write object`.

BeginnerTroubleshootingRepository Health, Size and Performance
Answer

Likely causes → The disk holding .git (or $TMPDIR) is full. On CI runners this is usually old workspaces, Docker images or a runaway tmp_pack_* file from an interrupted fetch.

Diagnose →

df -h . /tmp
du -sh .git
ls -lh .git/objects/pack/ | grep tmp_

Fix → Free space (clean old workspaces, docker system prune), delete stale tmp_pack_* files when no Git process is running, then run git fsck to confirm nothing half-written stayed behind and retry the operation.

Prevent → Monitor runner disk usage and clean workspaces after jobs.

All Git & GitHub questions Roadmap: Git & GitHub

More on Repository Health, Size and Performance