Reputation: 2094
How would one prevent certain users from modifying certain paths or files in a repository? Actually, as I see it, this is something that would be controlled by the repository server (through hooks?) but also some local client policy control would be nice, as a way to warn users beforehand.
I understand that user/role management is not part of git, but I'm sure there are tools and scripts out there that people are using to do this kind of control. Unfortunately I can't find almost any information on the subject.
Upvotes: 2
Views: 1236
Reputation: 301037
You can have hooks on client side as well to do the check ( ie in the git/hooks on the local clone. It can be a pre-commit hook - https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)
You can also consider using Gitolite for such purposes.
Upvotes: 4