Skip to content

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.

  1. Open your project.
  2. Click Repository Settings, the sliders icon in the left activity bar.
  3. Read Default branch and Source in the Default Branch card.
  4. 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.

A fallback applies only when the app does not know the GitHub default. It is your personal preference for this project.

  1. In the Default Branch card, click Choose fallback.
  2. Choose the branch your team uses as the project default.
  3. Click Use as fallback.
  4. 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.

  1. If Default branch is Unknown, choose an available fallback or restore GitHub access.
  2. Open Branch Management.
  3. 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.