A new local branch has never been pushed
Commongit switch -c or git checkout -b created the branch locally; nothing on the remote is linked to it yet.
Confirm
git branch -vv | grep '^\*'
The current branch with no [origin/…] in brackets
Fix
- Push it once with tracking: git push -u origin BRANCH.
- To make this automatic for every new branch: git config --global push.autoSetupRemote true.
git push -u origin HEAD
HEAD stands for the current branch, so you need not type its name. Checked on Git 2.50.1.