Fix 'git pull failed index.lock file exists' Error - VS Code Terminal Permission Error Guide-Fix fatal: refusing to merge unrelated histories error

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