From: Don Goodman-Wilson <don@xxxxxxxxxxxxxxxxxx> The current default name for the initial branch is a loaded term, and many Open Source projects renamed their principal branches already. A common choice appears to be `main`. Let's follow their lead and change the default of `init.defaultBranch`. Co-authored-by: Johannes Schindelin <johannes.schindelin@xxxxxx> Signed-off-by: Don Goodman-Wilson <don@xxxxxxxxxxxxxxxxxx> --- refs.c | 2 +- t/lib-submodule-update.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index 392f0bbf68..5576a90573 100644 --- a/refs.c +++ b/refs.c @@ -575,7 +575,7 @@ char *repo_default_branch_name(struct repository *r) die(_("could not retrieve `%s`"), config_display_key); if (!ret) - ret = xstrdup("master"); + ret = xstrdup("main"); full_ref = xstrfmt("refs/heads/%s", ret); if (check_refname_format(full_ref, 0)) diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh index bd3fa3c6da..1b0abcb0f8 100644 --- a/t/lib-submodule-update.sh +++ b/t/lib-submodule-update.sh @@ -144,7 +144,7 @@ create_lib_submodule_repo () { git checkout -b valid_sub1 && git revert HEAD && - git checkout "${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME-master}" + git checkout "${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME-main}" ) } -- gitgitgadget