Re: what's the Correct git update method keeping local changes

From: Felix Palmen <zirias_at_FreeBSD.org>
Date: Tue, 28 Mar 2023 10:00:05 UTC
* Cy Schubert <Cy.Schubert@cschubert.com> [20230327 20:55]:
> I maintain my own branch which contains my patches. In fact I maintain a 
> branch for each patch. I then do a git cherry-pick from each patch branch 
> to my own branch.

+1 for just maintaining your local branch, that's the cleanest way to do
it.

Git is pretty flexible, so many variations are possible. I personally do
it the other way around, I just have two branches, "local" and "wip",
with local containing anything I want to include in my poudriere bulk
builds and "wip" containing other development stuff.

For putting something up for review, I create a new branch from "main"
and cherry-pick the relevant commits from "local" or "wip".

Updating my branches is as simple as

git checkout local
git fetch upstream main:main
git rebase main

(and similar for my "wip" branch if it currently contains something)

There, "upstream" is my remote pointing at the official ports repository
hosted on freebsd.org.

-- 
 Felix Palmen <zirias@FreeBSD.org>     {private}   felix@palmen-it.de
 -- ports committer (mentee) --            {web}  http://palmen-it.de
 {pgp public key}  http://palmen-it.de/pub.txt
 {pgp fingerprint} 6936 13D5 5BBF 4837 B212  3ACC 54AD E006 9879 F231