git branch "master" renamed to "main"
Olly Betts
olly at survex.com
Sun Mar 22 23:09:03 GMT 2026
This should only be relevant to you if you access the Survex source code
using git.
I have renamed the "master" branch 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 now was a good
time to migrate another project I work on, so while I was looking up
best practices it seemed efficient to migrate survex too.)
I've migrated the main repo (survex), the website (survex-www) and
the homebrew tap (homebrew-survex). Homebrew >= 4.5.7 should handle
the change automatically (apparently "anyone on an older version will
need to run `brew update` twice or `brew tap --repair`).
New clones of any of these repos should use branch "main" automatically,
but if you have an existing local clone 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 the website, and the open PR has automatically been
retargetted to main. If you find anything that's not working due to
this change, please let me know.
Cheers,
Olly
More information about the Survex
mailing list