From: Ben Knoble Date: Mon, 02 Feb 2026 22:16:26 GMT Subject: Re: [PATCH] revisions: add @{default} shorthand for default branch Message-ID: <4EAD764C-5FCD-4934-BC39-5BF66C723C32@gmail.com> In-Reply-To: > Le 2 févr. 2026 à 16:33, Junio C Hamano a écrit : > > "D. Ben Knoble" 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.