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

Reference the master/main branch with @{m}

From
XRXavier Roche <xavier.roche@algolia.com>
Date
Apr 24, 2023, 15:11 UTC
Message-ID
<CAE9vp3+_PB0_rA81eWVCF=iXnWjrUVY=1G3=1JPUbcaw2u95Rg@mail.gmail.com>

With git, you can reference the upstream branch with the @{upstream} or @{u} shorthand (https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches)

With master/main branch varying among repositories, it would be handy to have a "main/master" reference, such as @{main} or @{m}

Would that make sense?
-- 
Xavier Roche -
xavier.roche@algolia.com
Next: Felipe Contreras
Message 1 of 2 in “Reference the master/main branch with @{m}”
  1. Xavier RocheApr 24, 2023
  2. Felipe ContrerasApr 24, 2023

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.