5

I've been investigating moving from SVN to Git so that we can make use of Gitlab. One thing I'm not sure about though; Can we point multiple projects in Gitlab at a single repository?

The documentation says:

Projects

A GitLab project roughly corresponds to a single git repository. Every project belongs to a single namespace, either a user or a group. If the project belongs to a user, the owner of the project has direct control over who has access to the project; if the project belongs to a group, the group’s user-level permissions will also take effect.

...but what does 'roughly' mean?

Community
  • 1
  • 1
Jon Cage
  • 36,366
  • 38
  • 137
  • 215

1 Answers1

4

Can we point multiple projects in Gitlab at a single repository?

No, a GitLab project include one Git repo, plus other features, as detailled in "Project features" (issues, wiki, snippets)

To group several projects (which means grouping several repos), you would need a GitLab group.

Note: with GitLab 13.5 (Oct 2020), you can point several projects to a single Wiki.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 2
    That's most disappointing given the limitations I've read about using submodules and subtrees to avoid using one monolithic repository when you have a lot of shared code which changes frequently. – Jon Cage Feb 04 '15 at 16:54
  • But wouldn't you be able to set one project for each repos you need, plus one parent project with a parent repo in it referencing the others as submodule? And all these projects can still be referenced in a single group. – VonC Feb 04 '15 at 17:00
  • Can you make a merge request which covers multiple projects (repo's)? The use case I'm struggling with is that if we update one of our products which requires a change to the code shared with other libraries, how do we synchronise the fact we need to change both the shared library and the calling project for a new feature to work? Or am I just going about this in the wrong way? From what I've read, subtrees and submodules are there to handle external libraries which change infrequently. – Jon Cage Feb 05 '15 at 08:42
  • @JonCage generally, a shared library is modified in the context of one of its parent repo which uses it. If that change needs to be visible by the other repos, they need to configure their own submodule link to that shared library in order to follow a branch (like the shared lib `master` branch): that way, the other apps keep track of the latest evolutions of the shared library. see http://stackoverflow.com/a/9189815/6309 and http://stackoverflow.com/a/18799234/6309. – VonC Feb 05 '15 at 08:53
  • This discussion might be better placed in another question I asked: http://stackoverflow.com/questions/26586227/how-do-i-migrate-a-svn-repository-with-many-projects-and-common-libraries-to-git – Jon Cage Feb 05 '15 at 10:31
  • @JonCage true, but I stand by with my "parent repo follows a branch of a submodule" advice: that truly allow for other projects to follow a submodule evolutions. – VonC Feb 05 '15 at 10:33
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/70297/discussion-between-jon-cage-and-vonc). – Jon Cage Feb 05 '15 at 10:47