Fix 'git pull failed index.lock file exists' Error - Understanding Git's Detached HEAD State-How to Stop Explorer.exe from Restarting in Windows 10

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