Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Dec 2020 14:14:09 +0800
From:      Guangyuan Yang <ygy@freebsd.org>
To:        jgh@freebsd.org
Cc:        freebsd-git@freebsd.org
Subject:   Re: question regarding git branches
Message-ID:  <CABBk%2B3rf5JQ4EBWEAbXEBmL7tx-yEc1EEeDvcYw68Y4ZP9oOuQ@mail.gmail.com>
In-Reply-To: <24571d35d243bfd67dbefcbac61f8c7e@FreeBSD.org>
References:  <24571d35d243bfd67dbefcbac61f8c7e@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
<jgh@freebsd.org> =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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABBk%2B3rf5JQ4EBWEAbXEBmL7tx-yEc1EEeDvcYw68Y4ZP9oOuQ>