Date: Thu, 19 Oct 2023 18:37:52 -0400 From: Marc Branchaud <marcnarc@gmail.com> To: Anton Saietskii <vsasjason@gmail.com>, freebsd-git@freebsd.org Subject: Re: Fwd: Right way to make a store local changes to repos Message-ID: <af45cfec-481d-471d-9677-95775054742c@gmail.com> In-Reply-To: <CAA2O=b8xd%2BeZowVk%2BF6HpacCeKDpJat2GmOkGBs=EV=aq1Y3=w@mail.gmail.com> References: <CAA2O=b_xBMdY_wYfRDYByUpbLLLug3TU85=Ucus2G0C2d50xaw@mail.gmail.com> <CAA2O=b8xd%2BeZowVk%2BF6HpacCeKDpJat2GmOkGBs=EV=aq1Y3=w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2023-10-18 11:08, Anton Saietskii wrote: > Hi folks, > > Here's what I'm doing: > * "git clone .../ports.git" > * since there are some patches which will never hit main tree (like > ccache support in bsd.gecko.mk), "git checkout -b local" > * "git pull -r" when I'm on local, hacking, commits, pull again, ... > * if I need to make some patch and send it -- I do "git checkout -b > <feature>" from local and "diff"/"format-patch local" when ready, then > "git checkout local" back > > To summarize: > origin/main -> main > local == I pull here, store local patches here So you are not keeping your local "main" branch up to date. That's perfectly reasonable. > feature-X == creating from local, I do patches which I send back here > > But sometimes, though not very often, I need to create a patch from a > clean tree (or switch to it for another reason), and here comes the > issue: "local" is up to date with "origin/main", but "main" is not. > Let's say it's 1000 commits behind (with only ~5 local ones), and > those commits changed 4000 files, so when I do "git checkout main" -- Don't checkout "main", since it's so out of date. Instead, create and checkout a new branch for your "clean" patch, based on "origin/main" (which is kept up to date by your pulls): git checkout -b my-clean-patch-branch origin/main M.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?af45cfec-481d-471d-9677-95775054742c>