简体   繁体   English

GIT权限:存储库内的存储库

[英]GIT permissions : Repository inside a repository

i have folder structure as below : 我的文件夹结构如下:

repo1
|
|---file1
|---fold1
    |
    |---file2
|---repo2
    |
    |
    |---file3

Lets say i have two users, user1 and user2 . 可以说我有两个用户, user1user2

Now i need to : 现在我需要:

  1. setup repo1 and repo2 as two separate GIT repositories . repo1repo2设置为两个独立的GIT repositories
  2. setup user1 to have permission for repo1 and user2 for repo2 . user1设置为具有repo1权限,并将user2 repo2权限。
  3. user1 should be able to pull file1 and fold1 contents but not repo2 user1应该能够提取file1fold1内容,但不能fold1 repo2
  4. user2 should be able to pull repo2 and files under it but not repo1 user2应该能够提取repo2及其下的文件,但不能repo1
  5. after user2 makes changes and commits to repo2 , it should be reflected under repo1 in the server user2进行更改并提交给repo2 ,应该将其反映在服务器中的repo1

Is this level of permissions possible with GIT ? GIT可能具有此权限级别吗?

see 'git submodule'. 参见'git子模块'。

  • passwords and permissions on the server repo's can be set in the server 可以在服务器中设置服务器存储库上的密码和权限

  • each user would have to have their own local repositories. 每个用户都必须拥有自己的本地存储库。

  • repo1 would be main module, repo2 would be the sub module. repo1将是主模块,repo2将是子模块。 see. 看到。

    git help submodule git help子模块

  • if user2 pushed (from local to server, after committing) to repo2, user1 would pull the changes with a 'git submodule update' command, but not automatially. 如果user2在提交后(从本地到服务器,在提交后)推送到repo2,则user1将使用'git submodule update'命令提取更改,但不会自动进行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM