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

From: Cy Schubert <Cy.Schubert_at_cschubert.com>
Date: Tue, 28 Mar 2023 03:55:07 UTC
In message <ZCJct8nsBSABpKOL@int21h>, void writes:
> Hello hackers@
>
> I looked in the porters and developers handbooks and couldn't find reference
> to a Correct method of working with git, poudriere, the ports tree and
> local changes for a use case like mine.
>
> Right now my workflow looks like this:
>
> 1. apply patch either with patch -p0 < patchfile or git apply from the 
>     top of the ports tree
> 2. git stash
> 3. poudriere ports -u -q
> 4. git stash pop
> 5. run the poudriere build

That's one way to do it.
>
> then, subsequent poudriere builds need steps 2-5 repeated.
>
> I'm wary of git merge/apply because i'm not a dev and so don't want to push
> changes. but I want to update the ports tree for poudriere with local changes
> keeping them local.
>
> What's the best way?
> -- 
>

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.

To update I git fetch followed by a git rebase origin/main while within my 
branch. This brings my branch up to date.

I maintain a separate repo, owned by a separate account, from which my 
poudriere builds its packages. This is a little extra work but keeps my 
development work totally separate from anything I'm developing.

I do the same with my src tree, which has patches that I have no intention 
of committing, yet, if ever.


-- 
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  https://FreeBSD.org
NTP:           <cy@nwtime.org>    Web:  https://nwtime.org

			e^(i*pi)+1=0