Reputation: 67
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 :
repo1
and repo2
as two separate GIT repositories
.user1
to have permission for repo1
and user2
for repo2
.user1
should be able to pull file1
and fold1
contents but not repo2
user2
should be able to pull repo2
and files under it but not repo1
user2
makes changes and commits to repo2
, it should be reflected under repo1
in the serverIs this level of permissions possible with GIT
?
Upvotes: 0
Views: 307
Reputation: 2604
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.
Upvotes: 2