Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Oct 2023 18:08:41 +0300
From:      Anton Saietskii <vsasjason@gmail.com>
To:        freebsd-git@freebsd.org
Subject:   Fwd: Right way to make a store local changes to repos
Message-ID:  <CAA2O=b8xd%2BeZowVk%2BF6HpacCeKDpJat2GmOkGBs=EV=aq1Y3=w@mail.gmail.com>
In-Reply-To: <CAA2O=b_xBMdY_wYfRDYByUpbLLLug3TU85=Ucus2G0C2d50xaw@mail.gmail.com>
References:  <CAA2O=b_xBMdY_wYfRDYByUpbLLLug3TU85=Ucus2G0C2d50xaw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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
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" --
my working tree goes far away into the past, I'm getting 4000 writes
to files (instead of only 5 which I changed locally).
How can I avoid that, keeping local changes at the same time? Thanks in advance.

--
wbr,
Anton



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAA2O=b8xd%2BeZowVk%2BF6HpacCeKDpJat2GmOkGBs=EV=aq1Y3=w>