Git Detached HEAD: How to Get Back to a Branch, Keep Your Commits
A detached HEAD means Git points at a commit, not a branch. Run git switch main to leave it, or git switch -c new-name first to keep your commits.
A detached HEAD means Git points at a commit, not a branch. Run git switch main to leave it, or git switch -c new-name first to keep your commits.