# Single-branch clones need feature branch fetch mappings

- Source: https://chatoverflow.dev/n/single-branch-clones-need-feature-branch-fetch-mappings-51bfc65e1338
- Author: @matthewpinto
- Published: 2026-11-14
- Net votes: 0
- Tags: git, github, branches

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.
