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

Re: [PATCH] revisions: add @{default} shorthand for default branch

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 2, 2026, 21:44 UTC
Message-ID
<xmqqms1qx1kk.fsf@gitster.g>
In-Reply-To
<20260202101445.13790-1-haraldnordgren@gmail.com>
Harald Nordgren <haraldnordgren@gmail.com> writes:
Show 6 quoted lines
> My main is a mirror of upstream/main. I never commit to it, just do
> 'git pull' to create releases.
>
> Also, I switch to it when I discover a bug on my branch, to try to
> understand if the bug is already on main or not. It's the baseline all work
> is compared against.
OK.

But for that kind of "I go there to see, but I never modify anything there let alone committing to it" usage, detached HEAD is exactly the tool invented for. So while I can understand the allure of always having my local 'main' be at the 'main' at the remote, I no longer see this as a "must have, somebody would die unless we add it" kind of thing anymore, even though I think it may be a nice thing to have for some people.

Thanks.
Previous: Harald NordgrenNext: Harald Nordgren
Message 24 of 32 in “revisions: add @{default} shorthand for default branch”
  1. revisions: add @{default} shorthand for default branchHarald Nordgren via GitGitGadget, Jan 29, 2026
  2. Junio C HamanoJan 29, 2026
  3. Harald NordgrenJan 30, 2026
  4. Harald NordgrenJan 30, 2026
  5. Junio C HamanoJan 30, 2026
  6. Harald NordgrenJan 30, 2026
  7. Junio C HamanoJan 30, 2026
  8. Harald NordgrenJan 31, 2026
  9. Junio C HamanoJan 31, 2026
  10. Harald NordgrenJan 31, 2026
  11. Harald NordgrenJan 31, 2026
  12. Junio C HamanoFeb 2, 2026
  13. Harald NordgrenFeb 2, 2026
  14. Phillip WoodFeb 2, 2026
  15. Harald NordgrenFeb 2, 2026
  16. D. Ben KnobleFeb 2, 2026
  17. Harald NordgrenFeb 2, 2026
  18. Kristoffer HaugsbakkFeb 2, 2026
  19. Ben KnobleFeb 2, 2026
  20. Harald NordgrenFeb 2, 2026
  21. Junio C HamanoFeb 2, 2026
  22. Ben KnobleFeb 2, 2026
  23. Harald NordgrenFeb 2, 2026
  24. Junio C HamanoFeb 2, 2026
  25. Harald NordgrenFeb 2, 2026
  26. Harald NordgrenFeb 3, 2026
  27. Phillip WoodFeb 3, 2026
  28. Junio C HamanoFeb 2, 2026
  29. revisions: add @{default} shorthand for default branchHarald Nordgren via GitGitGadget, Jan 30, 2026
  30. Kristoffer HaugsbakkJan 30, 2026
  31. revisions: add @{primary} shorthand for primary branchHarald Nordgren via GitGitGadget, Jan 30, 2026
  32. revisions: add @{primary} shorthand for primary branchHarald Nordgren via GitGitGadget, Jan 31, 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.