Re: [PATCH] revisions: add @{default} shorthand for default branch
Show 17 quoted lines
> Le 2 févr. 2026 à 16:33, Junio C Hamano <gitster@pobox.com> a écrit :
>
> "D. Ben Knoble" <ben.knoble@gmail.com> writes:
>
>> If you don't need to be on a branch, then "git switch -d origin" (or
>> upstream, or whatever your remote is) should work just fine.
>>
>> That just makes discovering the name of the remote the "interesting" part…
>
> The only thing that is different is if you need to _name_ a branch,
> or the commit pointed at is sufficient. In order to run something
> like "git shortlog origin..", "git shortlog @{default}.." is not
> needed.
>
> Of course, checking out and to be on the branch requires you to name
> a branch (otherwise when two branches point at the same commit, you
> cannot tell which one you want to check out)I oversimplified; thanks.