`Author identity unknown *** Please tell me who you are.` and `fatal: unable to auto-detect email address`
BeginnerTroubleshootingLost Work, HEAD and History Problems
Answer
Likely causes → user.name and user.email are not set (new machine, container, CI runner).
Diagnose → git config --list --show-origin | grep user.
Fix →
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
For one repo, omit --global. In CI, set them before committing.
Prevent → Put identity into your dotfiles or CI bootstrap script.
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`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`fatal: 'main' is already checked out at '/home/dev/app-hotfix'`Intermediate