On a Monday in 2023, Daniel P. Berrangé wrote:
There are essentially two options
* Rename 'master' to 'main'
With this, anyone pulling from an existing checkout will get an
error telling them that 'master' does not exist. It won't tell
them about 'main', but at least it gives them a sign that something
in their checkout probably needs changing.
Downside is that any URLs pointing to source files / commits with
a branch name in the URL will become 404s.
Commits should not be an issue, the hash is enough to identify them.
The links to 'blob's including 'master' do not reference any commits
so they would be prone to braking if we move the files around anyway.
* Clone 'master' to 'main'
With this, anyone pulling from an existing checkout will get no
updates. It is very easy for people to not realize that they are
tracking a branch which is no longer used
Downside is also that the undesirable term 'master' remains
present in the repo, even if unused. We might also miss places
which still refer to 'master' which will end up outdated
Due to the nature of git, it will stay in the history anyway.
But I think it's better not to mislead people and delete/rename the
branch completely, if a redirect is not possible.
Jano
Ideally, we would rename 'master' to 'main', while the git server
adds 'symbolic-ref' to effectively create a symlink to 'main'. This
would mean anyone pulling from 'master' would get content from 'main'.
AFAICT, this is not supported by
gitlab.com though. I had held off
suggesting the rename, hoping such support might arrive, but I'm
doubting it will happen on a timescale to be useful, if at all.