Fix Git Detached HEAD State in Visual Studio Code - How to Remove Stuck Git Lock Files After Crash-Fix Cloudflare 522 Error Firewall Blocking

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