Set the project default branch
The Default Branch card appears at the top of every Repository Settings category. GitHub’s default takes precedence whenever the app can identify it.
Check the default
Section titled “Check the default”- Open your project.
- Click Repository Settings, the sliders icon in the left activity bar.
- Read Default branch and Source in the Default Branch card.
- To refresh the result, click Refresh default branch.
If the app identifies a GitHub default whose commits are unavailable locally, fetch the branches with Remote Sync.
Choose a fallback
Section titled “Choose a fallback”A fallback applies only when the app does not know the GitHub default. It is your personal preference for this project.
- In the Default Branch card, click Choose fallback.
- Choose the branch your team uses as the project default.
- Click Use as fallback.
- Confirm that Default branch shows the intended branch and Source shows Local fallback.
To remove your fallback, click Clear fallback. A fallback does not switch your active branch or change the default on GitHub.
Resolve blocked branch actions
Section titled “Resolve blocked branch actions”- If Default branch is Unknown, choose an available fallback or restore GitHub access.
- Open Branch Management.
- Confirm that the default branch has the Protected badge.
The app blocks renaming or deleting the default branch. It also blocks deleting the current branch. These protections do not configure GitHub branch rules.
For other branch actions, see Manage branches.