Is there any way to limit access for developers to specific folders in gitlab or github?

Viewed 246

I have a project on Gitlab and I want to limit my developers to access only specific folders. For example I have 10 folders and I want developer1 to access only 5 folders in one repository and developer2 to access only 2 folders on repository. How can I handle it?

1 Answers

Ideally, each of those folders are repositories of their own, which you can make private, and add only the relevant developers to each one.

You can then have a parent repository which would reference those other repositories as submodules, each one in their own subfolder.

That way, only the approved developers can access the right folders.

Related