Fix 'git pull failed index.lock file exists' Error - VS Code settings.json Permission Denied Fix-How to Recover from Detached HEAD in Git

Result check
- Keep one change per test run so you know which step helped.
- Undo temporary changes after the issue is confirmed.