`fatal: couldn't find remote ref feature/x` on fetch or pull.
BeginnerTroubleshootingPush, Pull and Fetch Errors
Answer
Likely causes → The branch was deleted or renamed on the remote, or the name is misspelt.
Diagnose →
git ls-remote --heads origin | grep feature
git branch -vv
Fix → Fetch with prune (git fetch --prune), repoint your branch (git branch -u origin/<new-name>) or push it again if it should still exist.
Prevent → Auto-prune with git config --global fetch.prune true.
More on Push, Pull and Fetch Errors
`! [rejected] main -> main (fetch first)` / `(non-fast-forward)`Beginner`remote: error: GH006: Protected branch update failed for refs/heads/main.`Intermediate`! [rejected] feature -> feature (stale info)` with `--force-with-lease`.Intermediate`You are not currently on a branch.` when running `git pull` or `git push`.Beginner`There is no tracking information for the current branch.` when running `git pull`.Beginner`fatal: The current branch feature has no upstream branch.` on `git push`.Beginner