From: Harald Nordgren Date: Thu, 22 Oct 2026 13:43:34 GMT Subject: Re: [RFC] branch: delete gone-upstream branches only when proven merged into a named ref Message-ID: In-Reply-To: > Ah, but the manual seems to contradict my (personal) "natural" reading > of the command: "--delete-merged" actually deletes branches whose tip > is reachable from their upstream (when that upstream matches the given > pattern). So, phooey. In this case, if "topic@{upstream}" was > "origin/master", though, "--delete-merged=origin/*" would work, no? > Incidentally, I find it a shame that GitHub's documentation encourages > a triangular workflow (whether or not there is a fork remote involved) > without talking about how to configure Git to help you: fork or not, > if you push to a topic branch but merge to another, it's extremely > handy to use push.default=current or some variant so that > > - @{upstream} is the place you'll merge > - @{push} is the place you push > > and suddenly "git pull [--rebase]" does the right thing, "git status" > (esp. with the new "status.compareBranches") can tell you where you > are relative to both places of interest, etc. > > IOW, "git push -u origin topic" makes upstream configuration very odd > in the GitHub-ish workflow! Fully agree! I would say most workflows are triangular on the underlying level, even if the developer is not aware of it. If you work with GitHub PRs or GitLab's MR, then you are engaging in a triangular workflow. I picked up some important tricks for visualizing the triangular on this mailing list. But most of our users are not on the mailing list. But what we can and should do is to make git itself clearer, so they have a chance of intuiting it. I think for example that push.default=current should likely be the default. And many people would have a better time with branch.autosetupmerge=inherit which gives you upstream/master as @{u} from the beginning, and then you likely never abandon that if you are a regular GitHub user. This is also why I feel strongly about this as default (https://lore.kernel.org/git/pull.2458.git.git.1792437798463.gitgitgadget@gmail.com/): status.comparebranches=@{upstream} @{push} because it's confusing to switch tracking away from your "own branch" to upstream/master, if that means losing the waypoint of how things compare against @{push}. Harald