Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jun 2020 17:13:14 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        Sean Chittenden <sean@chittenden.org>
Cc:        Ed Maste <emaste@freebsd.org>, freebsd-git@freebsd.org
Subject:   Re: svn primer translation to git
Message-ID:  <20200625171314.GB75705@spindle.one-eyed-alien.net>
In-Reply-To: <CAHevUJE-Es=8sw6zGioS-UuaQNhhkbGJZdG9hbsosS7ENYUY-g@mail.gmail.com>
References:  <CAPyFy2Dy4cLQpgUsk_ushXsQFvRPk2S8SEfgWF=0xibGRGJvKw@mail.gmail.com> <20200625165547.GA75705@spindle.one-eyed-alien.net> <CAHevUJE-Es=8sw6zGioS-UuaQNhhkbGJZdG9hbsosS7ENYUY-g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--wq9mPyueHGvFACwf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jun 25, 2020 at 10:08:28AM -0700, Sean Chittenden wrote:
> >
> > generally follow a process of staging with `git add -p` + `git add` for
> > new files followed by `git status` and/or `git diff --staged`, and then
> > `git commit`.
> >
>=20
> This is a good callout, Brooks.
>=20
> I'm routinely shocked by the number of people who don't know about or use
> `git add -p` as their muscle-memory way to add something to a commit.  We
> definitely should go out of our way to document best practices.  For
> instance, this has been the workflow that I've worked in or pushed teams =
to
> for the last 6yrs and have had decent success:
>=20
> 1. Create Github issue
> 2. git checkout -b gh-${issue_number}
> 3. git add -p
> 4. git status
> 5. git diff --staged
> 6. git commit
> 7. git push -u origin gh-${issue_number}
>=20
> Where `gh-` would be whatever bug-tracking system of choice that you fanc=
y,
> but it keeps branch naming concise and gives the future reader a hint as =
to
> where to look for discussion.  While there may be variants of this, we
> should begin to prescribe a consistent workflow that does not encourage
> `git commit -a -m "fixedit"` or committing directly to main (svn's fka
> trunk branch).

One practice I've not adopted that we may want to recommend (especially
if we're going to have pre-commit scripts for people to install) is to
make your origin use a read-only url so you have to make an explicit
push to (e.g.) a freebsd remote.  At least at the beginning when it
appears we're going to be allowing direct commit, that's a way to
limit foot shooting.

-- Brooks

--wq9mPyueHGvFACwf
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJe9NspAAoJEKzQXbSebgfA+HUH/jE7c4LxyWvaBPj7WjJCLDiZ
SeE3DOMQCb9YqHsbeisDfh2Bwg4A5oRE3uAkvcmBMY+zPlkgB6bwvWTw7v9Rc581
0dNR9/jeppSpeX4OR5UGWpNg/BpLLNQBf/629Zl1+lJf+f1PJuIZ1O1vN91CPsKi
olWpcNnEO3lIurq0D6Y3vmvypvhFWWhNiUhYpbwTcG5b58yEyROhpvE2Jpvh2UAv
5IYx8ipRcvnIam9ivk8sKtbSpX2wvh6i8ifGA/Sz5/fKkEgmSvAo7NOkmI42bXqL
zJvqzhLZs6Q6Ws713G/DLxhYmyhar5BGR6K4STski6uOmyr4+ZIPtUkj8p2X6MY=
=+ILz
-----END PGP SIGNATURE-----

--wq9mPyueHGvFACwf--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200625171314.GB75705>