From nobody Tue Oct 12 16:42:11 2021 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DB6F517FBAC8 for ; Tue, 12 Oct 2021 16:42:22 +0000 (UTC) (envelope-from felix@palmen-it.de) Received: from stef.palmen-it.de (stef.palmen-it.de [IPv6:2001:470:1f0b:bbb:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4HTLzy0M2mz4kr4 for ; Tue, 12 Oct 2021 16:42:21 +0000 (UTC) (envelope-from felix@palmen-it.de) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=palmen-it.de; s=20200414; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:To:From:Date:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=sAIcS/4Zu7Q/wcqqF0lJl/gT3SdhDWg7ACbpJshGe4Q=; b=Zosm2byAbd2oGkdEO2kwc/xgU1 dbYDh85SwS3LFopdvBgfHq4O30UCSI5fcXoGrfDafV0Og4wR42QRe3k6ZHcskx25BoWYCaQWdlSRQ 4SKN9QJQKNqEV24urU9Cc4Fpjb4uBck2S14lKyuN73zcMWFClVC2up/POb+EQTuq1I4pBLASkVRUj Oz3ZAp5000dVVRD3yvQ4ODv0iengFsgr1ndQ4dDj5cZgcuo8Q4f+4SSlAPlFVdcwnfZ0kSM+Z+LrI afa3ADL7muUEwWSTonLP9uKdZ3zHinhT51g6aHUOvfw4itV/cFDnQ5GiAq8doOi6TFn31caXfXLIx ahbN4e8w==; Received: from [192.168.71.101] (helo=mail.home.palmen-it.de) by stef.palmen-it.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1maKqy-002y3a-SM for freebsd-current@freebsd.org; Tue, 12 Oct 2021 18:42:12 +0200 Received: from nexus.home.palmen-it.de ([192.168.99.2]) by mail.home.palmen-it.de with esmtpsa (TLS1.3) tls TLS_CHACHA20_POLY1305_SHA256 (Exim 4.94.2 (FreeBSD)) (envelope-from ) id 1maKqy-0000IZ-Hp for freebsd-current@freebsd.org; Tue, 12 Oct 2021 16:42:12 +0000 Date: Tue, 12 Oct 2021 18:42:11 +0200 From: Felix Palmen 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> Mail-Followup-To: freebsd-current@freebsd.org X-Face: /1K@t"h.}e~pR@]c7HorQ!T`F^RJCa'BCr#e>IKA{>C/9OTGB4|xh"y2{?1Z5M i2w"AH^pN_LlHR^{+f',_Np~;.B;!M/bL}*qk]p5*r7F5vW};{:@4u5S?T&f0$7BJ-71Q5SV]:v$`5 A0[DZ:=?S52x8HJ~5@^P_\T@MsjG{R( Organization: palmen-it.de References: <20211012173148.1d2f138c@hermann.fritz.box> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fsieiwvezpx2nbjh" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20210205 X-Rspamd-Queue-Id: 4HTLzy0M2mz4kr4 X-Spamd-Bar: -------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=palmen-it.de header.s=20200414 header.b=Zosm2byA; dmarc=pass (policy=none) header.from=palmen-it.de; spf=pass (mx1.freebsd.org: domain of felix@palmen-it.de designates 2001:470:1f0b:bbb:1::1 as permitted sender) smtp.mailfrom=felix@palmen-it.de X-Spamd-Result: default: False [-8.80 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[palmen-it.de:s=20200414]; NEURAL_HAM_LONG(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_MED(-2.00)[palmen-it.de:dkim]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:470:1f0b:bbb:1::1]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; TO_DN_NONE(0.00)[]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; RCPT_COUNT_ONE(0.00)[1]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[2001:470:1f0b:bbb:1::1:from]; DKIM_TRACE(0.00)[palmen-it.de:+]; DMARC_POLICY_ALLOW(-0.50)[palmen-it.de,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --fsieiwvezpx2nbjh Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Warner Losh [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 ,.//.......... {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--