Could not change default branch #176843
Replies: 4 comments 3 replies
|
If you're seeing the “Could not change default branch” error in some repositories, even without protection rules, here are a few things to check:
This issue often occurs when the branch hasn’t been pushed yet or when permissions are limited. If none of these apply, refreshing the page or trying again after a few minutes sometimes resolves transient UI glitches. |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
|
In all repos of our org the button to switch the branch disappeared for a few days for repo admins in May 2026 and was only visible to org admins. I'm a repo admin. On the 14th of May the button re-appeared but when I try to switch I get the same error: "Could not change default branch". I also tried Cli and it fails too: We do have an inherited ruleset but it's only "Block deletion/force pushes on main". |
Uh oh!
There was an error while loading. Please reload this page.
Select Topic Area
Question
Body
In half of my repos I could not change default branch.
No protection rules added...
I get message:

Without any explanation
All reactions