5

We have a situation where we need external contractors to do some work on a project but would like to restrict them to a certain branch on our (private) repository and manage the merging of this branch into the release branches ourselves. Is there a way of restricting users to a single branch of a repository?

2
  • Very much possible with a private repo using gitolite. Gitolite exactly offers this. But I'm not sure about this on github. Did you try contacting the github support people?
    – positron
    May 28, 2012 at 8:36
  • not possible with github in its current state - however it is indeed possible with gitolite like @positron said. if you're going to need that on a regular basis, you could also look at a local installation of gitlab - gitlabhq.com (runs well on a small 512MB RAM VPS, even though it's in RoR)
    – damianb
    May 28, 2012 at 15:40

1 Answer 1

5

Ask that person to fork the project and submit pull request when merging.

Note that their fork will be private, even if their github account is on a free plan.

2
  • I need to do the same thing, having an intern work on a single branch of our private repo. I made a test account to try and request a fork of our private repo, but I don't see how to do this. Any pointers?
    – Kevin_TA
    Apr 13, 2015 at 20:33
  • @Kevin_TA: You may want to take a look at this: stackoverflow.com/questions/9629538/…
    – nhahtdh
    Apr 14, 2015 at 8:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.