简体   繁体   中英

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 .

Now i need to :

  1. setup repo1 and repo2 as two separate GIT repositories .
  2. setup user1 to have permission for repo1 and user2 for repo2 .
  3. user1 should be able to pull file1 and fold1 contents but not repo2
  4. user2 should be able to pull repo2 and files under it but not repo1
  5. after user2 makes changes and commits to repo2 , it should be reflected under repo1 in the server

Is this level of permissions possible with GIT ?

see 'git submodule'.

  • 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. see.

    git help submodule

  • 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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