Guides to giving people part of a repo
Straight answers about what GitHub and git can and can't restrict, the honest alternatives, and where Gitfence fits.
- Can You Restrict Access to Folders in a GitHub Repo?No, GitHub has no folder-level read permissions. Here's why, what GitHub does offer (CODEOWNERS, push rulesets), and the options that hide folders.
- CODEOWNERS Is Not Access Control (What It Actually Does)GitHub CODEOWNERS requests reviews and can require approvals, but it doesn't stop anyone reading or cloning code. What it does, what it doesn't, and fixes.
- Git Sparse Checkout vs Real Access ControlGit sparse checkout hides files from your working tree, not your clone. What it does, how to bypass it in one command, and what restricts access.
- How to Give Contractors Access to Part of a GitHub RepoGitHub grants access per repository, not per folder. Here are the real options for giving a contractor part of a repo, with commands and tradeoffs.
- Least-Privilege Repo Access for Claude Code, Codex, CursorHow to give Claude Code, Codex and Cursor least-privilege repository access with permission rules, sandboxes, scoped tokens and filtered clones.
- Monorepo Permissions for Per-Team Access in One RepoGit and GitHub have no per-folder read permissions, so how do teams restrict access inside a monorepo? Options, tradeoffs and configs for per-team access.
- NDAs for Developers Before Code Access (Practical Guide)When and how to get an NDA signed before a developer or contractor sees your code, what to cover for AI tools, and how to gate access on it.
- Onboarding New Developers Without Full Codebase AccessHow to onboard new hires with least-privilege codebase access so they ship in week one without a full clone. Options, tradeoffs and a day-one checklist.
- Protecting Source Code from AI Agents and ContractorsHow to protect source code when AI coding agents and contractors work in your repo, what ignore files and NDAs really do, and what limits access.
Fence your first repository in minutes
Free for one repository and your own team. Add a restricted person and Pro is free for 14 days, no card.