Home > Blockchain >  Github allow all visitors to change one specific sub-directory
Github allow all visitors to change one specific sub-directory

Time:02-26

I have a Github repository where I want to put ideas from Redditors into one big file. I want to be the only one who can edit the master file, but I do want the Redditors to create there own files and edit them inside of a subdirectory of the Github repository. How can I do this?

CodePudding user response:

You're going to need to have to accept pull requests from users' independent forks in order to do this. GitHub doesn't offer a way to let arbitrary people modify any part of your repository, since that is usually not what people want, and in any event, it would be prone to serious abuse and spam problems. GitHub also doesn't offer restrictions on only a part of a repository, because as a practical matter Git doesn't support that and it couldn't be effectively enforced.

Accepting pull requests to files in that directory will allow people to contribute without letting them make arbitrary changes to the repository. You can, if you like, set up CI to allow people to only add files instead of modifying files or other similar kinds of policies.

You can of course set up a wiki if you want and use that, and then you can take the ideas out of there and put them into the repository as you'd like them to be.

  • Related