On our server are three (in reality: thousands of) text files stored in a bare git repository: A.txt, B.txt, C.txt.
- User "admin" should view/edit them all.
- User "Foo" should view/edit "A.txt" and "B.txt" but he is not allowed to see the content of "C.txt".
- User "guest" should only be allowed to view/edit "A.txt".
All three users should be able to clone the git repository with the files they are allowed to edit.
Is there any possibility to make this with git (...or mercurial)?
Idea: Can I make two clones of the bare git repository with the sparse checkout feature of git for the user "Foo" and "guest" wich include only the files they are allowed to see?
Any other (faster) idea?