From: Junio C Hamano Date: Mon, 02 Feb 2026 22:28:17 GMT Subject: Re: [PATCH] revisions: add @{default} shorthand for default branch Message-ID: In-Reply-To: Phillip Wood writes: > ... Please > correct me if I'm wrong but I think maybe what you're asking for is a > shorthand for the branch "$b" where > > git push origin $b > > would update the remote tracking branch pointed to by "origin/HEAD". > I've not really thought this through but if that is what you want maybe > we could add "@{local}" to give that branch. Then, with the default > refspecs and with "origin/HEAD" pointing to "origin/master", > "origin@{local}" would be "refs/heads/master". If you created a feature > branch with > > git checkout -b feature origin > > and you wanted to merge it into the local branch corresponding to the > default branch on its upstream remote you could do > > git checkout feature@{upstream}@{local} > git merge feature I do not know if that is what Harald is looking for, but I did wonder if we have use cases like that where we can string together multiple @{modifier} after a branch name. The @{local} thing that takes a remote-tracking branch and gives the local branch that would push to would be a "reverse" of @{push}; I wonder if three is need for a similar concept for a reverse of @{upstream} and if so, it would also be @{local-something-else}, and we may want to name this one not just @{local} but @{local-something}. That "feature@{upstream}@{local}" notation is a great food for thought. Thanks.