Git “no tracking information”: set the upstream branch
Set the upstream branch once with git push -u so push and pull know their target.
The branch has no upstream, so Git cannot guess where to push or pull. Run git push -u origin <branch> once, or git branch --set-upstream-to=origin/<branch>.
Try these fixes in order
Confirm the missing upstream
Run git status and git branch -vv. Confirm the current branch name and verify it shows no upstream tracking entry, which matches the error.
git status -sbgit branch -vvPush once with the upstream flag
Push the branch to origin while setting the upstream in one command. After this, bare git push and git pull target the recorded remote branch.
git push -u origin <branch-name>Or link an existing remote branch
If the remote branch already exists under the right name, link it without pushing using git branch --set-upstream-to=origin/<branch>. Verify with git status, which should now show the tracking relationship.
git branch --set-upstream-to=origin/<branch-name>Verify push and pull resolve
Run git pull --dry-run or git status to confirm the tracking works, then continue with normal push and pull commands.
Interpret what you see
The error appears on a branch you just created
What it suggests: A newly created local branch has no remote counterpart yet, so bare git push and git pull have nothing to default to.
Next check: Push once with git push -u origin <branch> to create the remote branch and record the upstream.
git branch -vv shows no [origin/...] tracking info for the branch
What it suggests: The upstream was never set because the branch was pushed from another machine or the remote branch was deleted.
Next check: Run git branch -vv to see which branches lack an upstream entry.
The upstream shown points at a nonexistent remote branch
What it suggests: A typo in the remote branch name during a manual --set-upstream-to leaves the branch tracking a ref that does not exist.
Next check: Run git status and git branch -vv to read the exact upstream Git recorded.
Why this happens
- The current branch has no upstream configured, so Git does not know which remote branch to push to or pull from.
- The branch was created locally with git checkout -b or git switch -c and never pushed with the upstream flag.
Still not working?
Changing push.default to matching or current to silence this message hides the real question of which remote branch you intend. Set the upstream explicitly once per branch instead; the configuration then documents your intent.
Official sources
These steps are based on the linked documentation and general diagnostics. BugMedic has not independently tested every product and system configuration. Review commands before running them.