Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set specific path permissions using Git?

Tags:

git

github

I'm using Git control version system. I want to set custom permission for a specific folder. For example, user1 can commit/read dir1, user2 can only read dir1 and others cannot read it at all. Is that possible and how? Does GitHub support it?

like image 867
Choo Avatar asked Nov 22 '11 11:11

Choo


1 Answers

The design of Git does not allow this kind of access-control. You can create separate repos for dir1 and dir2, and give appropriate permissions for each of those repos, but you can't restrict access to single directories inside a Git repo.

like image 57
Rudi Avatar answered Nov 02 '22 06:11

Rudi