Date: Sat, 3 Dec 2022 18:15:14 +0000 From: Nuno Teixeira <eduardo@freebsd.org> To: Warner Losh <imp@bsdimp.com> Cc: d@delphij.net, freebsd-git@freebsd.org Subject: Re: git-switch(1) then git-pull(1) Message-ID: <CAFDf7UJBCau628EAQQFk_u-sFrqznL1eY61q%2BSCSzzPM=Bq8Dg@mail.gmail.com> In-Reply-To: <CANCZdfqKXCuEgzUcnkr2YsbafU3qTp=kH4MJQc7J0OapAhVQRA@mail.gmail.com> References: <ef399d4c-cb26-2bff-9966-684d3a7b96ad@freebsd.org> <CAFDf7UJWWHKqAGFWdQHfXTH=H=c0vF1pf1X%2BZO78iDtiL3E=cg@mail.gmail.com> <c1a68261-6245-0c98-e356-3a806480a10b@delphij.net> <CAFDf7U%2Bd-fMZ3RstsSEdWyKX9PeA=ovC9OZgQQwNaky_grLMAw@mail.gmail.com> <CANCZdfqKXCuEgzUcnkr2YsbafU3qTp=kH4MJQc7J0OapAhVQRA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000003580e205eef0705d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Really nice. I'm thinking on 3 trees for ports: - main (push) - 2022Qn (cherry-pick, push) - test (push to main when testing done) $ git clone https://git.freebsd.org/ports ports/main $ cd ports/main $ git worktree add ../2022Q4 -b 2022Q4 origin/2022Q4 $ git worktree add ../test -b main origin/main My question is how do I push a commit from 'test' to 'main'? This sugestion is because I can have several ports in testing fase on 'test' branch and choose a specific commit to push to 'main' (local branch) and then do a final push. Does this makes sense? Warner Losh <imp@bsdimp.com> escreveu no dia s=C3=A1bado, 3/12/2022 =C3=A0(= s) 16:16: > > > On Sat, Dec 3, 2022 at 8:59 AM Nuno Teixeira <eduardo@freebsd.org> wrote: > >> Hello, >> >> $ git clone https://git.freebsd.org/ports ports/main >>> $ cd ports/main >>> $ git worktree add ../2022Q4 -b 2022Q4 origin/2022Q4 >>> >> >> So we will have ports/{main,2022Q4} and cd to main or 2022Q4 according i= f >> commit is to main or quarterly? >> >> I will try this soon because swithing from branches is not the best way >> (but I used it for about 1 year without problems). >> > > I do this for my src commits. I have 3 trees: 'head', 'stable-13' and > 'stable-12'. I have a lot of branches off of head > for work in progress that I switch between all the time to refine, finish > and land them. For especially large projects > I'll have a separate work tree, but usually the changes are small enough > that this works fine. I have a script that > rebases everything once and a while to keep my branches in sync. For > stable-12 I have a stable/12 branch locally > that mirrors upstream. I also have a stable/mfc12 branche that I > 'insta-MFC' changes that I commit to head that need > time to cook before being pushed. I do this so I don't lose things. I the= n > rebase the stable/mfc12 onto stable/12 and push > when the time comes (doing the rebase dance as needed). > > Warner > --=20 Nuno Teixeira FreeBSD Committer (ports) --0000000000003580e205eef0705d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><div>Really nice.</div><div><br></div><di= v>I'm thinking on 3 trees for ports:</div><div><br></div><div>- main (p= ush)<br></div><div>- 2022Qn (cherry-pick, push)</div><div>- test (push to m= ain when testing done)</div><div><br></div><div>$ git clone <a href=3D"http= s://git.freebsd.org/ports" rel=3D"noreferrer" target=3D"_blank">https://git= .freebsd.org/ports</a> ports/main<br></div><div>$ cd ports/main</div><div>$= git worktree add ../2022Q4 -b 2022Q4 origin/2022Q4</div><div>$ git worktre= e add ../test -b main origin/main</div><div><br></div><div>My question is h= ow do I push a commit from 'test' to 'main'?</div><div><br>= </div><div>This sugestion is because I can have several ports in testing fa= se on 'test' branch and choose a specific commit to push to 'ma= in' (local branch) and then do a final push.</div><div><br></div><div>D= oes this makes sense?<br></div><div><br><div><span class=3D"gmail-im"></spa= n></div><div><span class=3D"gmail-im"><div><br><br></div></span></div></div= ><div><br></div><div><br></div></div><br><div class=3D"gmail_quote"><div di= r=3D"ltr" class=3D"gmail_attr">Warner Losh <<a href=3D"mailto:imp@bsdimp= .com">imp@bsdimp.com</a>> escreveu no dia s=C3=A1bado, 3/12/2022 =C3=A0(= s) 16:16:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0p= x 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div d= ir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote"><div d= ir=3D"ltr" class=3D"gmail_attr">On Sat, Dec 3, 2022 at 8:59 AM Nuno Teixeir= a <<a href=3D"mailto:eduardo@freebsd.org" target=3D"_blank">eduardo@free= bsd.org</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"= margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-lef= t:1ex"><div dir=3D"ltr"><div dir=3D"ltr">Hello,<br></div><br><div class=3D"= gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px = 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> $ git clone <a href=3D"https://git.freebsd.org/ports" rel=3D"noreferrer" ta= rget=3D"_blank">https://git.freebsd.org/ports</a> ports/main<br> $ cd ports/main<br> $ git worktree add ../2022Q4 -b 2022Q4 origin/2022Q4<br clear=3D"all"></blo= ckquote><div><br></div><div>So we will have ports/{main,2022Q4} and cd to m= ain or 2022Q4 according if commit is to main or quarterly?</div><div><br></= div><div>I will try this soon because swithing from branches is not the bes= t way (but I used it for about 1 year without problems).</div></div></div><= /blockquote><div><br></div><div>I do this for my src commits. I have 3 tree= s: 'head', 'stable-13' and 'stable-12'. I have a lo= t of branches off of head</div><div>for work in progress that I switch betw= een all the time to refine, finish=C2=A0 and land them. For especially=C2= =A0large projects</div><div>I'll have a separate work tree, but usually= the changes are small enough that this works fine. I have a script that</d= iv><div>rebases everything once and a while to keep my branches in sync. Fo= r stable-12 I have a stable/12 branch locally</div><div>that mirrors upstre= am. I also have a stable/mfc12 branche that I 'insta-MFC' changes t= hat I commit to head that need</div><div>time to cook before being pushed. = I do this so I don't lose things. I then rebase the stable/mfc12 onto s= table/12 and push</div><div>when the time comes (doing the rebase dance as = needed).</div><div><br></div><div>Warner</div></div></div> </blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr" class=3D"g= mail_signature"><div dir=3D"ltr"><span style=3D"color:rgb(102,102,102)">Nun= o Teixeira<br>FreeBSD Committer (ports)</span></div></div></div> --0000000000003580e205eef0705d--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7UJBCau628EAQQFk_u-sFrqznL1eY61q%2BSCSzzPM=Bq8Dg>