Schwipps
Schwipps

Reputation: 43

Grant side developers a partial access to a git repo

Until now, I've been working on a project with a single and reliable agency.

However, I'd now like to speed up development by entrusting a few subjects to side developers. That means they need to access the repo, though I don't want them to get access to critical code.

Is there a way to grant them only a partial access to the repo (only the files I decided to show them), or to create (and maintain) a side repository, which doesn't includes some files/folders that I want to keep unknown to them ?

In other terms, I'd like these side developpers to work on the repo without granting them access to critical assets.

Upvotes: 4

Views: 1841

Answers (2)

Michael Durrant
Michael Durrant

Reputation: 96454

Despite my other answer I would actually recommend NOT using git submodules. They are confusing and not well understood. I've seen organizations use them and then yank them out afterwards.

I would personally consider using separate repos. I would add one task (shell script say) that combines (copies) the code into one place for use. I'd create an alias or function (allows parameters) to do this task

Upvotes: 1

Michael Durrant
Michael Durrant

Reputation: 96454

One approach is to Set Up a Submodule Where Only You Have Write Access:

Say you want to add a submodule to your repository, and this submodule is a one to which you have push access. It is frequently useful to be able to publish a repository with the submodule URL as pull-only, while keeping the push-pull URL in your own repository. This way, you can make changes to the submodule repository from within the enclosing repository. This is a simple thing to do in Git once you know how submodules are arranged.

Upvotes: 2

Related Questions