git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Feature Request - GIT config - Reference value of init.defaultBranch in alias
@ 2023-01-26  9:33 Michal Aron
  2023-01-26 16:21 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Aron @ 2023-01-26  9:33 UTC (permalink / raw)
  To: git

Hello,

I am curious why it is not possible to reference other variables in git config.

Useful scenario:

Global git config containing all useful aliases which often reference
the default main branch. I discovered the config variable
init.defaultBranch and I would like to reference it in the aliases.

1) global config having init.defaultBranch = master
2) global config having alias com = checkout [ init.defaultBranch ]
3) local repos replacing this value e.g. to init.defaultBranch = main
4) using this alias in local repo git com, which will checkout me to
the init.defaultBranch of this repository..

This would allow us to use global aliases independently on the
repositories.. If this has not yet been discussed I believe it is the
time since many repositories are being customized to the company
team/company culture.

Appreciate and thanks, Michal

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-26 16:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-26  9:33 Feature Request - GIT config - Reference value of init.defaultBranch in alias Michal Aron
2023-01-26 16:21 ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).