On our server, there are three (in fact: thousands) text files stored in the bare git repository: A.txt, B.txt, C.txt.
- The user "admin" must view / edit everything.
- User "Foo" must view / edit "A.txt" and "B.txt", but he is not allowed to see the contents of "C.txt".
- The user "guest" must allow viewing / editing of "A.txt".
All three users should be able to clone the git repository with the files that they are allowed to edit.
Is there any way to do this with git (... or mercurial)?
Idea: can I make two clones of the bare git repository with sparse check the git function for the user "Foo" and "guest", which includes only the files that they are allowed to see?
Any other (faster) idea?
source
share