Date: Sat, 03 Dec 2022 21:02:20 +0000 From: "Dave Cottlehuber" <dch@skunkwerks.at> To: freebsd-git@freebsd.org Subject: Re: git-switch(1) then git-pull(1) Message-ID: <af08450b-6022-4ea7-9efc-b3303a75519d@app.fastmail.com> In-Reply-To: <CAFDf7UJBCau628EAQQFk_u-sFrqznL1eY61q%2BSCSzzPM=Bq8Dg@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> <CAFDf7UJBCau628EAQQFk_u-sFrqznL1eY61q%2BSCSzzPM=Bq8Dg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 3 Dec 2022, at 18:15, Nuno Teixeira wrote: > 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. this would be similar to my setup, too. I have 3+ branches, as separate worktrees. - main -> dch/main - upstream -> freebsd-ports/main - quarterly -> freebsd-ports/2022Q4 or whatever my workflow is roughly as follows: ## do stuff, rebase it on upstream $ cd /usr/ports (now in dch/main) $ hack hack hack, git commit stuff on a pile of other crufty commits $ git fetch upstream/main && git branch --force upstream upstream/main $ git rebase --ignore-date --interactive upstream/main $ run some poudrieres, mmmm so good ## pull these over to upstream and push $ cd ~/ports/upstream $ git cherry-pick main main~1 main~2 $ git push -u upstream HEAD:main ## woops we should MFH these to quarterly $ cd ~/ports/quarterly $ git fetch upstream 2022Q4 && git reset --hard upstream/2022Q4 $ git cherry-pick -x main main~1 main~2 $ git push -u quarterly HEAD:main I think I got that more or less correct, it's a little confusing where all the different mains point to initially. Periodically, I need to adjust in .git/config where my "quarterly" points to, then the git reset again just works. A+ Dave
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?af08450b-6022-4ea7-9efc-b3303a75519d>