On Fri, Feb 05, 2021 at 03:35:27PM +0100, Vít Ondruch wrote:
Dne 05. 02. 21 v 12:39 Pierre-Yves Chibon napsal(a):
> On Fri, Feb 05, 2021 at 12:11:45PM +0100, Florian Weimer wrote:
> > * Kevin Fenzi:
> >
> > > Once the change is completed you will want to checkout rawhide/main
> > > instead of master and update/recreate any existing forks you have.
> > >
> > > See
> > >
https://fedoraproject.org/wiki/Changes/GitRepos-master-to-main
> > > for more information.
> > Would it be possible to add the sequence of commands to the proposal to
> > convert an existing clone with unpushed changes?
> >
> > I think it is something along the lines of (for
src.fedoraproject.org):
> >
> > git checkout master
> > git branch --move rawhide
> > git branch --set-upstream-to=origin/rawhide
> >
> > I'm not entire sure if “rawhide“ is the correct branch to use, and if
> > the sequence of commands is the right one.
> All of the above is correct.
>
> I'll add it to the wiki page, thanks for the suggestion!
If there was even chance to include how to change the whole bunch of such
repositories at once, that'd be appreciate by many I guess.
Something like:
# if you keep all your git clone in the same folder, run this at the top of that
# folder:
for i in `ls -1`; do pushd $i && echo $i && git fetch && git
checkout master && \
git branch --move rawhide && git branch -u origin/rawhide && popd ; done
The issue being that if one of the step fails in one of your clones, the entire
loop will stop and won't run another time :/
Pierre