git "master" branches renamed to "main"

Olly Betts olly at survex.com
Mon Mar 23 05:07:47 GMT 2026


I have renamed the "master" branches of all the Xapian git repos to
"main" (which will be the default branch name in git 3.0 and already is
the default in some of the hosted git forges).

Mostly this is a change that's useful to make at some point so that
our default branch name matches typical git usage, and doing it as we
start a new release series seems sensible.  Also the most recently
created repo was already using "main", so this resolves an inconsistency
between our own repos.

New clones of any of the repos from github should use branch "main"
automatically, but currently new clones from git.xapian.org will
still use branch "master" - you can specify to use branch main with:

  git clone -b main https://git.xapian.org/xapian

If you have an existing local clone of any of the repos you can update
it for this change like so (assuming your remote is named "origin",
which it will be by default):

    git branch -m master main
    git fetch origin
    git branch -u origin/main main
    git remote set-head origin -a

I've updated CI and am working through references in documentation and
scripts.  Open open PRs should have been automatically retargetted to
main.

We do need to update git.xapian.org so the default branch there is main,
but it seems I don't have access so James may need to do that.

Other than that, if you find anything that's not working due to this
change please let me know.

Cheers,
    Olly



More information about the Xapian-discuss mailing list