I know that I can use the Settings > Branch permissions to control modifications to a branch (write operations), but I don't see that I can control read operations. There is a branch I want to setup that allows a subset to view, while general access to the rest of the repo is the larger audience. Is this possible?
Hi @SteveKranz1958 and welcome to the community.
I'm afraid that this is not possible, it is not supported natively by Git and we also don't have a feature to do so.
When a user is granted at least read access to a repo, they can view all branches and source code in the repo.
You can look into using submodules: instead of keeping this branch in the existing repo (let's call it repo A), create a second repo, repo B, with this branch, and make repo B a submodule of repo A. This way you can grant access to different users in repo A and in repo B.
With submodules, when you clone repo A you can also get repo B' source code if you initialize and update the submodule (someone needs to have access to repo B to do that).
Please keep in mind though that it won't be possible to merge changes from repo B's branch to a branch of repo A, since they are essentially different repos.
You can read more about submodules here:
Kind regards,
Theodora
Thank you Theodora. I appreciate your response.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are welcome Steve, please feel free to reach out if you ever need anything else.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.