`error: pathspec 'feature/login' did not match any file(s) known to git`
BeginnerTroubleshootingLost Work, HEAD and History Problems
Answer
Likely causes → The branch does not exist locally (not fetched yet or a typo), or you ran checkout with a path that does not exist.
Diagnose →
git fetch --all --prune
git branch -a | grep login
Fix → Fetch, then git switch feature/login (it creates a tracking branch if exactly one remote has it), or create a new one with git switch -c feature/login.
Prevent → Use tab completion, and fetch before switching.
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