Home > Back-end >  Collaborating on Github Branches with sensitive code behind
Collaborating on Github Branches with sensitive code behind

Time:12-04

I am developing a website where I would like to keep large swathes of code unreadable / private / secret / need to know .. whatever.. from those team members that don't need to see it .. so front end dev and back end dev will be working on different branches..

There does not seem to be that sort of granularity in any of the version control software that I have explored.

I purchased the teams upgrade in github, thinking it would provide some sort of role definition or branch isolation (reading) BUT it still allows all team members with access to the repo to see the other branches and does not allow me to isolate certain members to particular branches.

Or am I misunderstanding something ?

CodePudding user response:

I confirm branches cannot be hidden with Git itself, or with a repository hosting service like GitHub.

You would need two repositories:

  • one for front/back end "common" code
  • one for front/back end "secret" code

You invite everybody as collaborators to the first repository.
But you add only privileged team members to the second.

That last team has access to the first "common code" repository, and can initiate pull request to the second repository, for them to benefit from the work done on the first repository.

  • Related