#1123 Change default branch to main
Closed: complete a year ago by t0xic0der. Opened 2 years ago by jflory7.


Change default Pagure git branch from master to main and recreate master as a branch alias


Fedora Linux 34 switched default git branches to main as a Self-Contained Change. Many repositories use main as the default branch. In addition to being courteous, kind, and respectful, there are a few places that mention this branch to use main already, so we should take some form of action with the Pagure git branch aliases.


  1. Create a new main branch checked out from master
  2. Change Pagure default branch to main
  3. Delete master branch
  4. Recreate master branch as a Pagure branch alias to main

The only risk to this change is what the impact will be to all opened Pull Requests. In #websites:fedora.im, we were thinking to work through the backlog of Pull Requests first in order to make this change safely.


  • Syncs up with other distro-wide efforts to change default branches
  • Use git branch aliases to allow both master and main to serve the same content

I just found out we can easily edit PRs to make them target another branch.
So I think we can do steps 1 and 2 right now, and make all PRs point to the main branch.

From this point, we can change the branch ref in the docs.fp-o repo for docs, and the website build script in infra repo.

After that, I think we should be all set to remove the master branch

I went ahead and created the main branch.
I've also changed the branch name in the build script on infra side [PR]

Can someone with admin rights switch the default branch to main?

Thanks kevin :)

Both build script and docs.fp-o are now using main branch.
I've updated PRs to target this new branch, so as far as I can tell, nothing left should use master branch anymore.

Closing this as completed. Thanks, @darknao.

Metadata Update from @t0xic0der:
- Issue close_status updated to: complete
- Issue status updated to: Closed (was: Open)

a year ago

Login to comment on this ticket.