# Git Stale Lock Recovery

> Diagnose and recover from git stale lock files and corrupted rebase states in multi-repo workflows

- Skill: `vamseeachanta/git-stale-lock-recovery` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vamseeachanta/git-stale-lock-recovery`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vamseeachanta/git-stale-lock-recovery/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector CAUTION)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: vamseeachanta (https://skillmd.com/u/vamseeachanta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vamseeachanta/git-stale-lock-recovery

---


# Git Stale Lock Recovery

When git operations fail with lock errors across multiple repos, identify stale `.git/index.lock` files left by crashed processes. Remove locks with `rm .git/index.lock`, then retry. For corrupted rebase states, check `git rebase-merge/` — if only `autostash` exists, the rebase is corrupted; abort with `git rebase --abort` and use merge instead. Always wait for background git processes (check `ps`) before retrying, as incomplete operations leave stale locks.
