git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] branch: delete gone-upstream branches only when proven merged into a named ref

From
Harald Nordgren <haraldnordgren@gmail.com>
Date
Oct 24, 2026, 14:52 UTC
Message-ID
<CAHwyqnVV86Satk=_on=oG6ZVnSF5GdUWmpP0_wE74HRKGpKfSg@mail.gmail.com>
In-Reply-To
<CALnO6CAxzo5gxpWkfjtvskTVjmWWD4oFE2QKyFMMo7JZUCkBmg@mail.gmail.com>
Show 9 quoted lines
> > 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.
>
> Yep. Maybe I'll start writing a "triangular workflow" document à la
> Julia's work… going on the todo list, at any rate.
That would be cool!
Show 12 quoted lines
> > 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.
>
> IIUC, the last change in this area was controversial. I worry that
> changes here now would have to get through "scar tissue" (both of Git
> contributors *and* users). At any rate, it would probably want to be a
> major version release, and I understand it's probably too late to
> discuss flipping that in 3.0?
Would be interesting to switch to "current" as default for 3.0.

But I don't know all the history there. "Simple" does feel like a compromise in that it's not really good for anyone :)

Show 10 quoted lines
> > 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.
>
> Hm. Since I mostly do
>
>     git switch -c topic origin

Me too (or it least I used to before I started experimenting with inherit) although for currying purposes I always spell it

    git switch origin -c topic

since I want to have the most variable part last, so e.g. "git sw..." auto-completes by pressing the up key in zsh to give me almost the right thing and I can just erase and re-fill the last part of the command. (This whole paragraph is a complete side-note.)

Show 8 quoted lines
> or similar, I'm ok with the default (=true). With inherit, the primary
> help is to folks who do
>
>     git switch -c topic main
>
> or something, right? But the documentation doesn't say what happens
> when inherit is used with a remote-tracking branch as a starting point
> (which has no upstream to copy from).

It's simpler than that, since you can skip the "main" part, which by the way I don't think is well understood by regular users.

This is the beautiful part: since you start with a good upstream when cloning (origin/main) you never need to leave it, *and* you never need to even specify it when branching throughout the lifecycle of the repo.

Harald
Previous: D. Ben KnobleNext: D. Ben Knoble
Message 5 of 15 in “[RFC] branch: delete gone-upstream branches only when proven merged into a named ref”
  1. DonQuinleoneOct 17, 2026
  2. D. Ben KnobleOct 22, 2026
  3. Harald NordgrenOct 22, 2026
  4. D. Ben KnobleOct 24, 2026
  5. Harald NordgrenOct 24, 2026
  6. D. Ben KnobleOct 24, 2026
  7. Harald NordgrenOct 22, 2026
  8. Ben KnobleOct 22, 2026
  9. Harald NordgrenOct 22, 2026
  10. Harald NordgrenOct 22, 2026
  11. D. Ben KnobleOct 24, 2026
  12. DonQuinleoneOct 24, 2026
  13. Harald NordgrenOct 24, 2026
  14. D. Ben KnobleOct 27, 2026
  15. D. Ben KnobleOct 24, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.