Subject: Re: Advice and repo setup

From: Jakub Narębski <[email-masked]>
Date: Wed, 10 Apr 2013 19:59:04 +0200

Michael Campbell wrote:

> My company is moving from CVS to git in a few weeks (and we have a
> training class scheduled with the github folks).
> 
> That said our CI/build guys have already got gitorious set up (we get
> to it through ssh with ssh keys and one "git" user on the server)

Note that gitorious is git hosting software / software forge, i.e.
combination of git hosting [configuration] software, web interface
to repositories, and web-based administration.

This is not the only solution.  Among other all-in-one solutions
are GitHUb:FI / GitHub Enterprise (proprietary and costly), InDefero,
GitLab, Girocco + gitweb (what repo.or.cz uses).  There are also pure
web interfaces, and there are pure repository management software
like gitosis (possibly unmaintained) and gitolite.

I see GitHub Enterprise and GitLab both recommended as alternatives
to Gitorious. But supposedly the most trouble is with installation,
and you write that you "have already got gitorious set up".

Unfortunately the Git Tools wiki page is not very actively maintained:
https://git.wiki.kernel.org/index.php/InterfacesFrontendsAndTools

> and
> we are in the process of migrating all new CVS checkins to a git repo.

What tool do you use for that?  Do you have tool selected to perform
a full migration from CVS to Git (to have full history in Git), or
will you cut off the history (perhaps stitching it later with historical
repo with history imported from CVS, via grafts or git-replace), like
Linux kernel did when moving from BitKeeper to Git?

BTW. it might make sense if you have time to massage the history
imported from CVS to remove CVS-related crufts and mishaps, e.g. with
the reposurgeon tool (http://www.catb.org/esr/reposurgeon/)

> As a business decision we have decided to pull in some "staff
> augmentation".  We don't want the remote developers to have direct
> access.  Our plan is to have some sort of external repo on which they
> can push things, and locally we can pull those changes to our
> "official" repo and check it as we go.  So far so good.

Another possible workflow is to have each of remote developers to get
updates from central "blessed" official repository, but for each to have
their own publishing repository they push to (and send pull requests about).

Or maybe something hierarchical, with each group having their own
repository...

> Our product has several logically separate projects, which right now
> we have in the one big mega repo (in CVS, and migrating per checkin to
> Gitorious).

Errr... didn't you use so called "modules" in CVS?  Those usually
translate to projects, which translate to git repositories.

> So... I was wondering what the best way to split up our new repo might
> be - or is it best to NOT split it?   One of the concerns we have is
> that in the one big repo we can't control access to the various
> projects.  So far we haven't needed to but this might be because we
> couldn't.

Split it, of course, into individual independent (more or less) project
repositories.  Note for example that you can tag (give name to a
release) only whole repository.

> So one plan is to have multiple repos, and then a mirror of those for
> the remote devs.  The other plan is to say "sod it" and have one local
> and one remote and just suffer through possible non-requirements of
> varying authorization profiles.

It would also lead to slower operations (git works well with large
number of files, but not necessarily with very large number of files),
and increased storage (you can clone only whole repository even if
nowadays you can check out only part of it; and you want for each
developer to have their own private clone to work in).

> Is there documentation I can refer to for this, or is there an obvious
> way to do these things?  Any help or pointers appreciated.

-- 
Jakub Narębski