Common causes
- Typo in a branch name, tag, or commit hash
- Referencing a branch from another repo that hasn't been fetched
- The branch or tag was deleted after you copied its name
- Using a short commit hash that's ambiguous or doesn't exist locally
How to fix it
- Fetch all refs from remote: git fetch --all
- List local branches: git branch -a
- List all tags: git tag
- If using a commit hash, double-check it with git log --oneline
Example
fatal: Not a valid object name: 'feature/missing-branch'Running git show or git checkout with a branch name that was deleted or never fetched
Have a different error?
Paste any error message into the Error Translator to get an instant explanation.
