Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restrict Github collaborators to only modifying their own files on a repo?

I want github collaborators to only be able to modify / make changes to the files that they themselves uploaded on the repository

they should not be able to replace, rename, edit or modify files uploaded by other collaborators in the same repository

is this possible in a private github repository?

like image 207
Muhammad Yasir Avatar asked Nov 28 '25 12:11

Muhammad Yasir


1 Answers

Git operates at a repository level, so if a collaborator can push to a repository, they can clone, modify locally any file and push back.

You can isolate their work through fork and pull request.
And use an GitHub action like check-new-commits (modify for your purpose) to check if each commits only includes files whose list of authors is limited to one.

like image 86
VonC Avatar answered Nov 30 '25 05:11

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!