On Wed, Feb 19, 2025 at 02:12:40AM +0100, Denis 'GNUtoo' Carikli wrote:
> This doesn't take care of existing repositories, and it is possible to
> handle that as well but the way I know does require practical control
> over the infrastructure (there may be better ways though that works
> without ssh access):
> 
> $ git checkout origin/master -b temporary
> $ git push origin HEAD:main
> $ ssh root@server
> $ cd /path/to/repository.git
> $ git symbolic-ref HEAD refs/heads/main # Change the main branch
> $ git symbolic-ref refs/heads/master refs/heads/main # Make master point to 
> main
> 
> I did it on many Replicant repositories for instance, and it's 100%
> transparent to the users. With that, new clone of the repositories use
> main by default.

Nice, thanks for sharing these tips!

Reply via email to