I’m looking at a potential mass branch rename from master to main.
The primary focus of this request is - what’s the best way to accomplish this in gitlab itself. I’m not seeing any API support for doing the rename. Since this would likely be a one-time event, I’m fine with a solution that involves doing it server side (even with gitlab itself shut down if necessary), but would prefer to not do this piecemeal/manually on individual projects.
Has anyone else done this on a (large) scale? (Figure 150-200 repos.)
The second item would be whether there is any good way to add a symbolic reference to have at least minimal support server side if someone tries to continue to reference ‘master’ after things have been changed to ‘main’. (Though not sure if that actually works for pushes - I know you can do a symbolic ref in a bare repo to allow cloning from different branch names pointing to same history.)
Just confirmed that adding a symbolic ref to link master to main or vice versa does work for both push and pull on a non-gitlab repo destination, just not sure if this would make gitlab unhappy if it were added behind the scenes. Intent would be to at least leave some degree of support for dangling branch references in various clones on servers that haven’t been updated – even though we’ll be making every effort to update the references in those cloned repos.