'How to prevent other contributers to modify some files in Git?
I have some personal directories in git for experimentation code, but it also may be interesting to others to see. For example directories /personA and /personB. How can I achieve the following:
- each person can modify and commit changes in his personal directory as usual
- everyone can see all directories
- however, no one should be able to push changes in the other persons directory (it can be a "soft" solution to prevent when this happens by accident)
The other person's directory could be read-only, or alternatively changes there will always be overwritten by a consequent git pull.
Solution 1:[1]
You can't do this, because if person have access to git repository, person can modify all files in repository
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kostya Andreev |
