Fix 'git pull failed index.lock file exists' Error - Git Detached HEAD Recovery Guide-Troubleshooting Git Password Prompts in VS Code

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