How to Recover Stashed Changes in Git Detached HEAD - Error 0x80070002 on Windows 11: Step-by-Step Troubleshooting-Git index.lock Persists After Deletion: How to Fix

Final checklist
- Confirm that the same symptom is gone after a restart or refresh.
- Keep the smallest working change and undo temporary diagnostic settings.