Recover from Corrupted Git State When bulk git operations (large commits, background pulls, rebases) fail or leave stale state: (1) Check for lock files and background processes ( ); (2) Detect corrupted rebase state via directory — abort with and switch to merge; (3) If pre-commit hooks block large files, unstage oversized files and recommit selectively; (4) For untracked file conflicts during pull, move conflicting files to , pull, then restore; (5) Always verify final state with and divergence count (should be 0/0 after sync). ---