Re: [PATCH] revisions: add @{default} shorthand for default branch
- From
- Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
- Date
- Feb 2, 2026, 21:53 UTC
- Message-ID
- <6e2e8e79-7fe9-4b3c-9257-bedba0be3308@app.fastmail.com>
- In-Reply-To
- <20260202211919.4968-1-haraldnordgren@gmail.com>
On Mon, Feb 2, 2026, at 22:19, Harald Nordgren wrote:
Show 5 quoted lines
>> 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. > > Thanks, but it needs to be a branch, do you use detached heads for > anything? 🤗 For me, the only ever happen by accident.
The remote-tracking branch itself is enough for me to do things like:
> > Also, I switch to it when I discover a bug on my branch, to try to > > understand if the bug is already on main or not. It's the baseline all work > > is compared against.
And to compare against with git-diff(1), use in a range to git-log(1), and use in `git branch --set-upstream-to=origin`.