Date: Tue, 12 Oct 2021 18:42:11 +0200 From: Felix Palmen <felix@palmen-it.de> To: freebsd-current@freebsd.org Subject: Re: git: "overlay" of own remote-branch on official freebsd-ports repo Message-ID: <20211012164211.nl7gmpu74io5lndo@nexus.home.palmen-it.de> In-Reply-To: <CANCZdfri3j1xmFTEA2fXjW-JawRExPTx7ykZeGJv5MFBhii-zQ@mail.gmail.com> References: <20211012173148.1d2f138c@hermann.fritz.box> <CANCZdfri3j1xmFTEA2fXjW-JawRExPTx7ykZeGJv5MFBhii-zQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--fsieiwvezpx2nbjh Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Warner Losh <imp@bsdimp.com> [20211012 10:01]: > tl;dr: branches are cheap and well supported in git. You just make a bran= ch > for your > local changes, and update that however you see fit. >=20 > For ports I have like that, I've just created a branch in git. I rebase t= he > branch forward > each time I update. +1, I do basically the same. I'd say having a local branch in your local repo is one ot the killer features of git over svn. I just do a few details slightly different, maybe it helps as one possible example. I only fetch 'main' from the official repo and rebase my 'local' branch onto that. During the rebase, it's easy to solve any conflicts with changes in 'main'. You still keep a list of your local commits, well organized. I recently decided to also publish my local branch. So now I just have two remotes on my local ports repo, the official FreeBSD repo and another one on github, looking like this: # git remote -v origin https://github.com/Zirias/zfbsd-ports.git (fetch) origin https://github.com/Zirias/zfbsd-ports.git (push) upstream https://git.freebsd.org/ports.git (fetch) upstream https://git.freebsd.org/ports.git (push) With that and remote branch tracking set up correctly, I just need these commands (I have them in a script) to update from the official repo, rebase and force push to my github repo: git checkout local git fetch upstream main:main && git rebase main git push -f --all BTW, git leaves working copy changes alone if possible, so maybe it's poudriere's way of using git that erases them =E2=80=93 just use git direct= ly instead of poudriere. And then, I always hated having random local changes not organized in any way, this quickly grows into a maintenance nightmare, so I'm very thankful I can now easily use git branches instead. --=20 Dipl.-Inform. Felix Palmen <felix@palmen-it.de> ,.//.......... {web} http://palmen-it.de {jabber} [see email] ,//palmen-it.de {pgp public key} http://palmen-it.de/pub.txt // """"""""""" {pgp fingerprint} A891 3D55 5F2E 3A74 3965 B997 3EF2 8B0A BC02 DA2A --fsieiwvezpx2nbjh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEqJE9VV8uOnQ5ZbmXPvKLCrwC2ioFAmFlutUACgkQPvKLCrwC 2iof4wgAtWj71NFTzAhgsE67y+po529rv/x7Rrt8E9LQGQk+PMJ2RU+2CiOGFZoZ UbAB4Qeta6BRZDIrcy3G70GYrNtrAktrS+ZBPQ4i9kbEhPO9ODQ5+ky/z/PCwGh5 iTdT7siFvdiG5wJ6yy2VDMcwfxSg1ZEn/kCtuEoqlXMCiRlOGtozc3kvkxSMkbrC Qv0s2Tqfjgi2rFEdcSU1P2AekQStmtY+X8ADVGcn9xFbSfnf203qvxosP2CglFQ/ 0uDzFJJpg5HVHryGaRfO08m/OayyCHG686vXkh7k3Y0C4/ql+4xUfPJdpAPz5DUo E9UuGiI4d3dQc5WVIyhoLL5WXjH0AA== =YhUn -----END PGP SIGNATURE----- --fsieiwvezpx2nbjh--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20211012164211.nl7gmpu74io5lndo>