Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion refs.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ char *repo_default_branch_name(struct repository *r, int quiet)
die(_("could not retrieve `%s`"), config_display_key);

if (!ret) {
ret = xstrdup("master");
ret = xstrdup("main");
if (!quiet)
advise_if_enabled(ADVICE_DEFAULT_BRANCH_NAME,
_(default_branch_name_advice), ret);
Expand Down
2 changes: 1 addition & 1 deletion remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -2379,7 +2379,7 @@ struct ref *guess_remote_head(const struct ref *head,
return copy_ref(r);

/* Fall back to the hard-coded historical default */
r = find_ref_by_name(refs, "refs/heads/master");
r = find_ref_by_name(refs, "refs/heads/main");
if (r && oideq(&r->old_oid, &head->old_oid))
return copy_ref(r);
}
Expand Down
2 changes: 1 addition & 1 deletion t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ fi

# Explicitly set the default branch name for testing, to avoid the
# transitory "git init" warning under --verbose.
: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=master}
: ${GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME:=main}
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME

################################################################
Expand Down
Loading