On a GitHub repo, I'd like the master branch to actually be an alias to a x.y.z branch. As a consequence, all fetch/push from x.y.z and master would result to the exact same result. I do want to keep the master branch because people are used to it, but also want the x.y.z branch to not make master a special-case of a branch name (other branches are a.b.c, d.e.f...).
Is there a way to achieve that on GitHub? Or on a Git remote repository in general?
On GitHub side, you can change the default branch.
On a remote repo side, you can similarly change the default branch.
Setting a branch alias is not directly possible on GitHub side.
It is on a remote hosting git repo server you have access to:
git symbolic-ref refs/heads/master refs/heads/x.y.z
But the alias part would not propagate to a git cloned repo: while every new clone would checkout by default x.y.z, their user would have to setup the alias locally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With