Hey everyone! I'm trying to get a better handle on GitHub's access management. Currently, it seems like GitHub only allows access control at the repository level, meaning there's no way to restrict access to specific folders. In large organizations, how do you typically manage this situation? Are there any effective strategies or tools you could recommend? I'm looking for alternatives to submodules—if we do end up using them, will we need to adjust our GitHub workflow? Thanks in advance for your insights!
2 Answers
You might want to think about your use case. If you're looking to give access to a third-party contractor for just one folder in a monorepo, that's tricky! I really don't think GitHub currently allows that level of granularity. Your best bet could be to explore using Git subtrees. Essentially, you could pull in another repo as a subtree for that specific folder, which might help keep the rest of the codebase private.
I get where you're coming from! GitHub's permissions are set at the repo level, so if someone has access to the repo, they can see everything inside it. However, if you need more granular control, consider using CODEOWNERS files. This way, you can specify who needs to approve changes in certain directories when a pull request is created. It helps a bit in managing contributions without completely locking down folders.
Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically