How to Fix a Detached HEAD with Git Reset --hard - How to Resolve Git index.lock Permission Denied-Docker Pull Access Denied on Mac M1: Step-by-Step Fix

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