Recover from Stale Git Locks When git operations fail with errors, the lock file may persist after a crash. Check if any git process is actually running with . If none exist, safely remove the stale lock file with , then retry the operation. For submodules or nested repos, check and clean locks in each directory. Always verify the background process completed before proceeding. ---