threads / discuss / 33408

Advice and repo setup

Subject: Advice and repo setup

## tl;dr

4 messages between Apr 6, 2013 and Apr 10, 2013.

replies: 3people: 4as markdown or json

Michael Campbell· Apr 6, 2013, 17:51 UTC · lore

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) and we are in the process of migrating all new CVS checkins to a git repo.

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.

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).

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.

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.

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

Seth Robertson· Apr 6, 2013, 18:09 UTC · re: Michael Campbell · lore

Re: Advice and repo setup

In message <CAKtB=OAot3y8fMjAf+Vh-=wOeX5b=F_N6_BLjK0fhGxGCg3Txg@mail.gmail.com>, Michael Campbell writes:
    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.

You might want to consider using something like gitolite where you can have control over which branches users can write to. Assuming you are not trying to restrict some branches of some repos from the external users, this would be a better solution than setting up another repo with some kind of automatic mirroring scheme, though that of course will also work.

    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).

Certainly I'd recommend using one repo per conceptual unit. There are several techniques to group repos together if you need to.

    Is there documentation I can refer to for this, or is there an obvious
    way to do these things?  Any help or pointers appreciated.
http://sethrobertson.github.com/GitBestPractices/
					-Seth Robertson
Thomas Koch· Apr 7, 2013, 06:12 UTC · re: Michael Campbell · lore

Re: Advice and repo setup

Michael Campbell:
> 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.

You could also use Gerrit[1]. It's not only a code review server (and any team should have code review). It also hosts git repositories and you can write submit rules to reflect any possible write rule your company might have[2].

[1] http://en.wikipedia.org/wiki/Gerrit_%28software%29 [2] https://gerrit-review.googlesource.com/Documentation/prolog-cookbook.html

Regards,
Thomas Koch, http://www.koch.ro
Jakub Narębski· Apr 10, 2013, 17:59 UTC · re: Michael Campbell · lore

Re: Advice and repo setup

Michael Campbell wrote:
Show 5 quoted lines
> 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/)

Show 5 quoted lines
> 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.

Show 5 quoted lines
> 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

← back to recent threads