From owner-freebsd-git@freebsd.org Thu Dec 10 06:14:23 2020 Return-Path: Delivered-To: freebsd-git@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 39E29476708 for ; Thu, 10 Dec 2020 06:14:23 +0000 (UTC) (envelope-from ygy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cs3Xb0Xqjz3FWY; Thu, 10 Dec 2020 06:14:23 +0000 (UTC) (envelope-from ygy@freebsd.org) Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: ygy) by smtp.freebsd.org (Postfix) with ESMTPSA id F05052443; Thu, 10 Dec 2020 06:14:22 +0000 (UTC) (envelope-from ygy@freebsd.org) Received: by mail-lj1-f175.google.com with SMTP id e7so5366954ljg.10; Wed, 09 Dec 2020 22:14:22 -0800 (PST) X-Gm-Message-State: AOAM5311Cf2UeCu6K5jCWLWFRLUtztrjw+TLpDpLrm5SVsHDSLAsGFVZ pRDOPFOeUrhVxbCMZJxIKRCemoLbz+Z6kPnO9IU= X-Google-Smtp-Source: ABdhPJzVV/69wE77DPbikHf32/irPRrhPVBtbIkgvAptNrb34eXhAz4yryJa+SLil/25EKowzw46y7R+p69FtxGA6M0= X-Received: by 2002:a2e:5011:: with SMTP id e17mr2500048ljb.430.1607580861421; Wed, 09 Dec 2020 22:14:21 -0800 (PST) MIME-Version: 1.0 References: <24571d35d243bfd67dbefcbac61f8c7e@FreeBSD.org> In-Reply-To: <24571d35d243bfd67dbefcbac61f8c7e@FreeBSD.org> From: Guangyuan Yang Date: Thu, 10 Dec 2020 14:14:09 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: question regarding git branches To: jgh@freebsd.org Cc: freebsd-git@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion of git use in the FreeBSD project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2020 06:14:23 -0000 =E4=BA=8E2020=E5=B9=B412=E6=9C=8810=E6=97=A5=E5=91=A8=E5= =9B=9B =E4=B8=8A=E5=8D=888:17=E5=86=99=E9=81=93=EF=BC=9A > > My question more so is around workflow. Typically, it is seen as good > practice to commit to a new branch and then merge to the main branch. Is > this something that is being done as part of the commit process, or are > commits being done straight to main branch? > > I'm not sure I need to go into the reasoning of having multiple branches > and what that can do insofar as community and mentoring support, > development CI/CD pipelines, etc. If this conversation goes down this > path, though, I would be more than happy to discuss along with others. > I'm not on the Git team, but just wanted to share my planned workflow: Start by setting the FreeBSD Git remote as upstream, and my Github repo [1] as origin: $ git remote -v origin git@github.com:yzgyyang/freebsd-doc.git (fetch) origin git@github.com:yzgyyang/freebsd-doc.git (push) upstream git@gitrepo.FreeBSD.org:doc.git (fetch) upstream git@gitrepo.FreeBSD.org:doc.git (push) And then the workflow for commits will be: develop on origin/dev, (open a pull request for reviews/CI), rebase merge to origin/main, then push to upstream/main. This way, one would still be able to work on multiple branches and do some collaborations and testing (just not on the project level), and enjoy some of the CI features. For example [2], I linked the repo to my personal Jenkins instance, so all Pull Requests will be tested. For sure that enabling branch & merge operations will open up a lot of new possibilities, but so far, this Git transition already helps me heavily with the dev workflow. [1]: https://github.com/yzgyyang/freebsd-doc [2]: https://github.com/yzgyyang/freebsd-doc/pull/6 Best, --=20 Guangyuan Yang ygy@FreeBSD.org