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, 18:23 UTC
Message-ID
<CAHwyqnU5abc_KL-R__7G=PU8hGAaRGrXwZLuCkMJE0qoEFfKUQ@mail.gmail.com>
In-Reply-To
<ba149000e13634ffcc5dc51e4d584a56@donquinleone.com>
Show 13 quoted lines
> 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
Previous: DonQuinleoneNext: D. Ben Knoble
Message 13 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.