No apparent way to rename the default branch of a project from Master to something more inclusive
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
I've been searching for a while today trying to find some sort of howto for changing the default branch from Master to something like Main for an LP project. Everythign I've found seems to work up to removing the old Master branch.
I took one of my projects, renamed Master to Main locally, changed all the tracking and such and pushed to LP. I now have a Main branch on my LP project, and my local clones track Main instead of the old Master.
However, when I then try to delete the Master branch, I get an error telling me I don't have permission to delete the unused Master branch in my own project.
! [remote rejected] master (deletion of the current branch prohibited)
Looking a bit further at this: https:/
and I've learned that GitHub makes this pretty easy, but simply renaming Master to anything arbitrary you wish, and then including instructions on how to update the local repos to match.
Launchpad Git should include an easy way to change the default branch of a project.
Changed in launchpad: | |
status: | New → Triaged |
importance: | Undecided → Low |
You need to set the new default branch in the Launchpad UI.
- go to your repository
- at the right side click on "Change repository details"
- rename e.g. refs/heads/master to refs/heads/main
Please make sure that open merge proposals get merged first, or you will need to resubmit them.
I agree that there should be a proper help document for this.