From: Chris Torek Date: Tue, 23 Dec 2025 12:23:39 GMT Subject: Re: [PATCH] status: show default branch comparison when tracking non-default branch Message-ID: In-Reply-To: <20251223113602.63000-1-haraldnordgren@gmail.com> On Tue, Dec 23, 2025 at 3:36 AM Harald Nordgren wrote: > Once the users runs that suggested command > > git push --set-upstream origin ahead_of_main_status__tmp2 > > then the 'branch..merge' and 'branch..remote' no longer hold the reference to "upstream/HEAD". Right. And, as Junio noted, to: >> learn the other, the destination of a push of this branch, would >> involve poking at remote.pushdefault, branch..pushRemote, >> branch..remote to find out which remote repository it goes, >> and then remote..push to find out where this branch goes, That is, there are some separate configuration items that can change where `git push` goes. Using `git push --set-upstream` sets ones that affect `git pull`, `git status`, and `git push`, but it's possible to set ones that affect only `git push`. That still leaves `git status` with the problem you (Harald) have observed, so perhaps the path forward is to have `git status` check things like branch..pushRemote to see if they exist and differ from branch..remote. Chris