You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
branch: suggest <remote>/<branch> when set-upstream-to slips
A user reaching for "git branch --set-upstream-to origin main" expects
the second token to name the remote branch to track. The option takes a
single <remote>/<branch> argument, so the trailing word is read as the
local branch to operate on and the command dies with "branch 'main'
does not exist", which points at the wrong thing.
When the local branch does not exist, the upstream argument is a bare
remote name, and that remote has a matching remote-tracking ref,
suggest the intended "--set-upstream-to=<remote>/<branch>" form.
Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
0 commit comments