Date: Sat, 3 Dec 2022 09:16:30 -0700 From: Warner Losh <imp@bsdimp.com> To: Nuno Teixeira <eduardo@freebsd.org> Cc: d@delphij.net, freebsd-git@freebsd.org Subject: Re: git-switch(1) then git-pull(1) Message-ID: <CANCZdfqKXCuEgzUcnkr2YsbafU3qTp=kH4MJQc7J0OapAhVQRA@mail.gmail.com> In-Reply-To: <CAFDf7U%2Bd-fMZ3RstsSEdWyKX9PeA=ovC9OZgQQwNaky_grLMAw@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>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000009a25c805eeeec7af Content-Type: text/plain; charset="UTF-8" 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 if > 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 then rebase the stable/mfc12 onto stable/12 and push when the time comes (doing the rebase dance as needed). Warner --0000000000009a25c805eeeec7af Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Sat, Dec 3, 2022 at 8:59 AM Nuno T= eixeira <<a href=3D"mailto:eduardo@freebsd.org">eduardo@freebsd.org</a>&= gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0= px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left: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> --0000000000009a25c805eeeec7af--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqKXCuEgzUcnkr2YsbafU3qTp=kH4MJQc7J0OapAhVQRA>