Fix Nginx 502 Bad Gateway: Upstream Connection Refused - VS Code Git Changes Missing from Source Control-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.