svn primer translation to git

Adriaan de Groot adridg at freebsd.org
Thu Jun 25 18:33:57 UTC 2020


On Thursday, 25 June 2020 19:47:24 CEST Warner Losh wrote:
> > 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.
> 
> I almost always do a git show for each and every commit I push. The few
> times I've tried to short cut this, I've wound up in trouble.

Something else to explicitly discourage is fast-cycle "git commit -a ; git 
push" which I've seen some people do in other projects: it mimics the svn 
approach of "when you commit it goes to the central repo immediately" but 
misses all the useful bits of a DVCS -- the ones Warner just mentioned, of 
rewriting local history and making the branch or sequence of commits logical 
and well-documented in commit messages.

This might sound a little Linussy, but maybe we should for a while offer "git 
intermediates" where act like the Linux staging trees / lieutenants who gate 
things through to the primary repository. That can help alleviate friction 
when people start pushing their own stuff.

Oh, and I should mention the KDE setup of GitLab, too:

- merges in the real repository *socially* require a review and merge by 
someone else (this can also be done technically, but that's a GitLab 
enterprise feature)
- pushes to normal branches are ok (this is where some MRs come from) but you 
can't force-push
- branches called work/ are .. work branches, and force-pushes are ok there.

This approach means that you can coach people on their work branches, before 
merging them in to the primary branch with whatever strategy you like. It 
slows down *some* things, just a little bit, (nice when it's a footcannon) and 
helps people up the git learning curve.

[ade]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freebsd.org/pipermail/freebsd-git/attachments/20200625/09aace0b/attachment.sig>


More information about the freebsd-git mailing list