HOWTO: Change default branch on pagure.io projects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Per https://fedoraproject.org/wiki/Changes/GitRepos-master-to-main#Phase0_-_2021-01-05
here's a short guide for any interested folks on how to change the
default branch in pagure.io projects:

Switching default branch from ‘master’ to ‘main’ on pagure.io

If you have an existing project using ‘master’ as it’s default branch:
git clone ssh://git@xxxxxxxxx/YOURPROJECT.git
(This checks out your repo with it’s current ‘master’ branch)

git checkout -b main
(This creates a local ‘main’ branch)

git push
(This pushes the new ‘main’ branch to pagure.io)

Go to your project, Settings, “Default Branch”, set to ‘main’, click “Make Default”
(This switches the ‘default’ branch you get if you do not specify one)

git push origin :master
(This deletes the old ‘master’ branch)

If you have are just creating a new project:
When creating the project specify ‘main’ as the default branch.

(This will be changed soon to default that way)

Q&A:

Q: What happens to pull-requests that are against the old ‘main’ branch?
A: They will show an error, you will need to get the submitter to open a new pull-request
against the new branch name (we will be fixing pagure so it allows updating the
target branch of a PR in the (near) future)

Q: I want to call the default branch something else, do I have to use ‘main’?
A: main is becoming a industry wide name, so people are going to expect it.
That said, it's your project and you can name it anything you like.

Q: What happens to Documentation/Issues/Pull Requests repos associated to the projects?
A: We are not changing anything on theses repos for now, we will update you when we change
the default branch on these repos.

Q: What happens to users who have a checkout of the old default branch?
A: If they do a 'git pull' they will get: 

 * [new branch]      main       -> origin/main
Your configuration specifies to merge with the ref 'refs/heads/master'
from the remote, but no such ref was fetched.

They need to do 'git checkout main' and pull will work fine again.

As a reminder, on 2021-01-06 (tomorrow), we will be changing the following pagure.io
repos to use 'main' as default branch: 

 pagure.io:
   releng
   releng/*
   fedora-comps
   fedora-kickstarts
   fedora-infrastructure
   fedora-lorax-templates
   fedora-mediawikitheme
   fedora-packager
   fedora-infra/*
   infra-docs
   koji-fedmsg-plugin
   workstation-ostree-config
   pungi-fedora
   fedora-docs/*
   fedora-docs-i18n/*

See https://fedoraproject.org/wiki/Changes/GitRepos-master-to-main
for more information.

kevin   

Attachment: signature.asc
Description: PGP signature

_______________________________________________
devel-announce mailing list -- devel-announce@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-announce-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel-announce@xxxxxxxxxxxxxxxxxxxxxxx
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux