Restrict Master Clonning

Hi Team,

Could you please help, How do you restrict Users from Master branch Cloning? I see in Protection rule only Push/pull restrictions. I dont want my developers to access Master OR they shouldn’t clone from master ?
Please share me the approach.

Branch protection rules are to restrict modification of branches, not reading them. It is not possible to restrict read access per branch, you can only make a repository private or public as a whole. Anyone with read access will be able to read all branches.

Relevant documentation on both topics:

1 Like