How to only allow one git branch, one folder?

amberleong
New Contributor

Users are able to switch branches in the git UI. How to restrict or only allow one branch?
Also, for the sparse checkout, how to view only one folder (without files from root)

Alberto_Umana
Databricks Employee
Databricks Employee

Hello @amberleong,

To restrict users from switching branches in the Git UI and only allow one branch, you can implement branch protection rules in your Git repository, directly from your source code git tool.