From: Harald Nordgren Date: Sat, 24 Oct 2026 18:23:48 GMT Subject: Re: [RFC] branch: delete gone-upstream branches only when proven merged into a named ref Message-ID: In-Reply-To: > D. Ben Knoble wrote: > > In this case, if "topic@{upstream}" was "origin/master", though, > > "--delete-merged=origin/*" would work, no? > > Yes. With push.default=current, "git switch -c topic origin/master" > and a plain "git push origin topic", the dry run offers to delete topic > once the pull request is merged, with no code change at all. So the gap > is only for people who follow the hosting services' advice and run > "git push -u", which points @{upstream} at the topic's own remote > branch. That's the setup I'd hoped to help, and I suspect it's a common > one, but I agree the better long-term fix there is teaching the > triangular setup. A document like the one you mentioned would be very > welcome. FWIW, I still regard "squash merge" as part of a triangular workflow, since GitHub's PRs are inherently triangular. Harald