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?