On Fri, Dec 11, 2020 at 08:15:19AM +0100, Pierre-Yves Chibon wrote:
> On Thu, Dec 10, 2020 at 10:29:12AM -0800, Kevin Fenzi wrote:
> > On Thu, Dec 10, 2020 at 10:36:36AM +0100, Robert-André Mauchin wrote:
> > > On 12/3/20 4:02 PM, Ben Cotton wrote:
> > > > https://fedoraproject.org/wiki/Changes/GitRepos-master-to-main
> > > > 
> > > > == Summary ==
> > > > 
> > > > This Change will move Fedora git repositories to use "main" as the
> > > > default git branch instead of "master". Specific repositories will be
> > > > manually moved and default git branch for new projects will be set to
> > > > use "main".
> > > > 
> > > > The Fedora Community strives to be open and welcoming. Some language
> > > > around our git repositories is dated and could be more inclusive. Many
> > > > git repositories currently use "master" as the default branch. This
> > > > Change will move many repositories (see below) to use a "main" branch
> > > > as default. This small bit of naming adjustment is in-line with
> > > > Fedora's vision for free and open source software built by inclusive,
> > > > welcoming, and open-minded communities.
> > > > 
> > > > 
> > > 
> > > How does it work for the enduser? I have thousand of git repos locally 
> > > with
> > > the master branch, will it rename automatically master to main when I git
> > > pull or do I need to run a special command?
> > 
> > You will need to reclone or run some commands in those existing
> > checkouts. 
> > 
> > If you have a clone that has 'master' branch and we delete that, and you
> > 'git pull' you will get: 
> > 
> > Fetching origin
> > Your configuration specifies to merge with the ref 'refs/heads/master'
> > from the remote, but no such ref was fetched.
> > 
> > So you will need to do: 
> > 
> > git checkout main
> > git branch --set-upstream-to=origin/main main
> 
> Since the main branch will exist on the remote, you may be able to do:
> git fetch
> git checkout main
> 
> and I think the git branch --set-upstream-to is no longer needed then
> 
> > then git pull. 
> > 
> > I don't think there's anything we can do on the server side to make that
> > easier. Pingou any ideas?
> 
> Not at the moment.

A silent failure to update would be bad. But since there will be a clear
error message, I think that's good enough.

Please make that 'git fetch && git switch main' (or '... rawhide') though.

Zbyszek
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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@lists.fedoraproject.org

Reply via email to