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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] 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ábado, 3/12/2022 à(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 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 > -- Nuno Teixeira FreeBSD Committer (ports) [-- Attachment #2 --] <div dir="ltr"><div dir="ltr"><div>Really nice.</div><div><br></div><div>I'm thinking on 3 trees for ports:</div><div><br></div><div>- main (push)<br></div><div>- 2022Qn (cherry-pick, push)</div><div>- test (push to main when testing done)</div><div><br></div><div>$ git clone <a href="https://git.freebsd.org/ports" rel="noreferrer" target="_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 worktree add ../test -b main origin/main</div><div><br></div><div>My question is how 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 fase on 'test' branch and choose a specific commit to push to 'main' (local branch) and then do a final push.</div><div><br></div><div>Does this makes sense?<br></div><div><br><div><span class="gmail-im"></span></div><div><span class="gmail-im"><div><br><br></div></span></div></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Warner Losh <<a href="mailto:imp@bsdimp.com">imp@bsdimp.com</a>> escreveu no dia sábado, 3/12/2022 à(s) 16:16:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Dec 3, 2022 at 8:59 AM Nuno Teixeira <<a href="mailto:eduardo@freebsd.org" target="_blank">eduardo@freebsd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hello,<br></div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> $ git clone <a href="https://git.freebsd.org/ports" rel="noreferrer" target="_blank">https://git.freebsd.org/ports</a> ports/main<br> $ cd ports/main<br> $ git worktree add ../2022Q4 -b 2022Q4 origin/2022Q4<br clear="all"></blockquote><div><br></div><div>So we will have ports/{main,2022Q4} and cd to main 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 best 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 trees: 'head', 'stable-13' and 'stable-12'. I have a lot of branches off of head</div><div>for work in progress that I switch between all the time to refine, finish and land them. For especially large 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</div><div>rebases everything once and a while to keep my branches in sync. For stable-12 I have a stable/12 branch locally</div><div>that mirrors upstream. I also have a stable/mfc12 branche that I 'insta-MFC' changes that 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 stable/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="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><span style="color:rgb(102,102,102)">Nuno Teixeira<br>FreeBSD Committer (ports)</span></div></div></div>help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7UJBCau628EAQQFk_u-sFrqznL1eY61q%2BSCSzzPM=Bq8Dg>
