How to define different users for different directory access.
In my repos containing a c++ solution, I want to make different users to have different projects which are in different directory.
Such as A, B two users, D1, D2, D3 three directory in my repos.
The A user only could read D1, D2 directory.
The B user only could read D2, D3 directory.
Hi @sysuwhb and welcome to the community!
Giving access to a certain directory only in a repo is something not supported natively by Git and we don't have such a feature available either. When a user gets granted access to a repository, they have access to the whole repo.
You may want to look into Git submodules instead and see if it's something that would work for you:
E.g. you could create three separate repos for each directory (D1, D2, D3) and then make these repos submodules to your main repo. This way, you could give access to users only to certain submodule repos.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.