Recover From Corrupted Git State

Diagnose and recover from corrupted git states (stale locks, failed rebases, pre-commit hook blocks) during bulk operations

vamseeachanta Updated

File contents

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 (ps aux | grep git); (2) Detect corrupted rebase state via rebase-merge directory — abort with git rebase --abort 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 /tmp, pull, then restore; (5) Always verify final state with git status and divergence count (should be 0/0 after sync).

vamseeachanta/workspace-hub/tree/main/.agents/skills/workspace-hub/learned/recover-from-corrupted-git-state commit 4ef2f980eb

Frequently asked questions

npx skillmds@latest add vamseeachanta/recover-from-corrupted-git-state