]> git.ipfire.org Git - thirdparty/git.git/commit - refs.c
init: allow setting the default for the initial branch name via the config
authorDon Goodman-Wilson <don@goodman-wilson.com>
Wed, 24 Jun 2020 14:46:33 +0000 (14:46 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Jun 2020 16:14:21 +0000 (09:14 -0700)
commit8747ebb7cde9e90d20794c06e6806f75cd540142
tree2dedd0e043802202071b7490c1ba1a97ac03ad88
parent32ba12dab2acf1ad11836a627956d1473f6b851a
init: allow setting the default for the initial branch name via the config

We just introduced the command-line option
`--initial-branch=<branch-name>` to allow initializing a new repository
with a different initial branch than the hard-coded one.

To allow users to override the initial branch name more permanently
(i.e. without having to specify the name manually for each and every
`git init` invocation), let's introduce the `init.defaultBranch` config
setting.

Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Helped-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Don Goodman-Wilson <don@goodman-wilson.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config/init.txt
builtin/init-db.c
refs.c
refs.h
t/t0001-init.sh