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
D. Ben Knoble <ben.knoble@gmail.com>
Date
Oct 24, 2026, 15:30 UTC
Message-ID
<CALnO6CCCHAG5UZi5w3znr5Uiruk8RvF2QZYu+QcVRzenyesu-w@mail.gmail.com>
In-Reply-To
<CAHwyqnVV86Satk=_on=oG6ZVnSF5GdUWmpP0_wE74HRKGpKfSg@mail.gmail.com>

On Sat, Oct 24, 2026 at 10:52 AM Harald Nordgren <haraldnordgren@gmail.com> wrote:

Show 18 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 :)

I can certainly agree it doesn't seem that way to me! OTOH, it's being used by presumably most of our users today… so… "good" is perhaps a matter of how you define it ;)

You and I see "good" as "helping folks take advantage of all Git has to offer", while some of our users are content "as simple as possible without learning more that lets me get the job done." Neither is better than the other, so even if I too wish push.default=simple were not the default, I can't say it isn't good for anyone :/

Show 20 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.)

Continuing the tangent, then, that's now "git help cli" describes Git working, and one day someone might make things stricter and break you ;)

Show 11 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.

Ah, I also didn't understand that. But that only works if (a) you're already on a branch whose upstream is main, a reasonable assumption, and (b) you don't care if you have to type "git reset --hard @{upstream}" afterwards, right? If I am on some topic branch that's ahead of upstream, then my new branch is at the same commit, which is not usually what I want. In some projects and workflows that's a reasonable thing to do, though!

One advantage for me of specifying origin or w/e is that I get to start with a clean slate/known good starting point, since the reset happens automatically.

-- 
D. Ben Knoble
Previous: Harald NordgrenNext: Harald Nordgren
Message 6 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.