`fatal: a branch named 'feature/login' already exists`
BeginnerTroubleshootingLost Work, HEAD and History Problems
Answer
Likely causes → The branch exists locally, maybe from an earlier attempt.
Diagnose → git branch --list 'feature/*' and git log --oneline -3 feature/login.
Fix → Switch to it (git switch feature/login), pick a different name, or reset it to a fresh start: git switch -C feature/login origin/main (this discards its old pointer; check the reflog if needed).
Prevent → Use ticket IDs in branch names and delete merged branches.
More on Lost Work, HEAD and History Problems
`fatal: Unable to create '/repo/.git/index.lock': File exists.`BeginnerYou added a file to `.gitignore`, but `git status` still shows it as modified.Beginner`fatal: your current branch 'main' does not have any commits yet`Beginner`Author identity unknown *** Please tell me who you are.` and `fatal: unable to auto-detect email address`Beginner`fatal: ambiguous argument 'HEAD~1': unknown revision or path not in the working tree.`BeginnerYour commits do not show on your GitHub profile contribution graph.Intermediate