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

Re: Feature Request - GIT config - Reference value of init.defaultBranch in alias

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 26, 2023, 16:21 UTC
Message-ID
<xmqqbkmlcln6.fsf@gitster.g>
In-Reply-To
<CAHoQa4-o-=pB4zPR-1SG96KB02rixQG23mFgh0H9ojWrQ_pREg@mail.gmail.com>
Michal Aron <aronmgv@gmail.com> writes:
> 1) global config having init.defaultBranch = master
> 2) global config having alias com = checkout [ init.defaultBranch ]

I do not think it is a good idea to special case just a single configuration variable and come up with a special syntax to refer to it.

Isn't
  [alias]
	com = !git checkout $(git config init.defaultBranch)
sufficient?
Previous: Michal Aron
Message 2 of 2 in “Feature Request - GIT config - Reference value of init.defaultBranch in alias”
  1. Michal AronJan 26, 2023
  2. Junio C HamanoJan 26, 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.