是否可以添加一个只有特定文件夹在回购协议中的协作者? [英] Possible to add a collaborator w/ push access only to a specific folder in a repo?
问题描述
我有一个基于数学的项目,我希望所有成员都能将权限推送到他们自己的文件夹中,而不是其他成员的文件夹。
项目/
丹/
约翰/
Sarah /
贝基/
主/
data.csv
自述文件.md
这就是当前组织的一切。每个成员都有自己的文件夹,他们可以保留工作,然后在小组会议中讨论不同的方法并采取最佳方法并更新Master文件夹。这允许小组中的每个人相互学习。我还是比较新的git和github,所以我不确定这是否是最好的方法,但它似乎工作。是否可以将协作者只添加到回购协议中的文件夹?或者我应该以某种方式构造这种不同?在未来,这个小组将在许多不同的项目上工作,所以每个回购项目都将成为一个新项目。
据我所知这不可能。
一个解决方案是使用GitHub Pull Requests,这里是你需要做的:
I have a math based project where I want all members to have push rights to their own folder within this project but not to other member's folders.
Project/
Dan/
John/
Sarah/
Becky/
Master/
data.csv
README.md
This is how everything is currently organized. Each member has their own folder where they can keep their work and then during group meetings we discuss different approaches and take the best methods and update the Master folder. This allows everyone in the group to learn from each other. I'm still relatively new to git and github so I'm not sure if this is the best approach but it seems to work. Is it possible to add collaborators ONLY to their folder within the repo? or should I structure this different somehow? In the future this group will work on many different projects so each repo would be a new project.
As far as I know it is not possible. One solution is to use GitHub Pull Requests, here's what you need to do:
- Only allow you to push/accept
- Others get read-only right to the repo
- They fork the repo and do their work there
- They create a Pull Request and ONLY YOU can decide to merge or not
这篇关于是否可以添加一个只有特定文件夹在回购协议中的协作者?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!