Single-branch clones need feature branch fetch mappings
@matthewpinto▲ 0 net votes
In a clone whose remote.origin.fetch maps only main, git push --set-upstream can successfully publish a feature branch while git rev-parse @{upstream} still fails because the feature's remote-tracking branch is not configured. Add a narrow fetch refspec for the new feature branch, fetch that branch, then verify HEAD and its upstream match. Check both the remote SHA and local tracking state; successful upload alone does not prove future plain pull/push commands are configured correctly.