Getting started
Set up Gitfence for your organization: create it, connect GitHub, add a repository, restrict folders and invite your first contractor.
Short answer: An organization holds your repositories, your people and your plan. Setting one up takes a few minutes: create it, connect GitHub, add a repository, decide what restricted people cannot see, and invite them.
Steps
- Sign in with GitHub. Open
https://gitfence.devand choose Start free with GitHub. Gitfence never sees your GitHub password. - Create the organization. Enter an Organization name and choose Create organization. You become its owner, and its address is
https://gitfence.dev/o/<organization-slug>. - Save the recovery key. Gitfence shows it once, under Save your recovery key. Choose Copy or Download as a text file, tick I saved my recovery key, then Continue. Store it somewhere your team can find it. You can make a new one later under Settings → Encryption.
- Connect GitHub. On the setup step Connect GitHub, choose Connect GitHub and install the Gitfence app on the GitHub account or organization that owns your repositories. You choose which repositories the app can see. Come back to Gitfence when GitHub sends you back.
- Pick repositories. Tick the repositories where some people should see less than everything, then choose Add
repositories (the button shows the count). Missing one? Choose Choose repositories on GitHub and update the app's repository list. - Choose who's restricted. Under Choose who's restricted, tick Contractors, New hires or AI agents, then pick the folders to protect under Protect core IP. A folder becomes Types only when it holds TypeScript, otherwise No access. The preview shows the result before you save, and Save and continue applies it.
- Let the pull request filter finish. Gitfence starts preparing it as soon as a group exists: it keeps hidden code out of the pull request conversations restricted people read. On a small repository it is ready in seconds. On a large one it takes up to half an hour: the setup checklist shows Prepare the pull request filter, and the repository's Pull requests page shows how far it got (with Build now if it stopped). Until it is ready, restricted people's pull requests show "Checking" and their conversations wait; nothing hidden is shown.
- Invite people. Enter GitHub usernames or email addresses, choose the Group, and choose Create invitations (or Send invitations when email is enabled). You can also create one link for a whole team. Invitation links are shown once.
What to check
Open the repository and use Preview as to see exactly what a group or person will get before they clone. The Files tab shows every folder with each group's access, and Matrix shows the same rules per person.
Gotchas
- Hiding files in a public repository does not make them secret: anyone can read the repository on GitHub. Gitfence still controls who can push through it.
- The Free plan includes 1 repository and no restricted people. Adding the first restricted person or invitation starts the 14-day Pro trial, with no card.
- The recovery key is not shown again. If you lose it, an owner can make a new one while the organization is open.
- For a very large repository, contractors can make their first clone shallow with
git clone --depth 1 .... This works. Partial clone (--filter) is not supported yet. See Working on pull requests.
Next: add a contractor and choose access levels.
Related guides
- Adding a contractor or new hireInvite a contractor or new hire, choose their access, require an NDA and set an end date. What they clone and how they start.
- Access levelsThe four Gitfence access levels, how rules combine, and what restricted people and AI agents can read, edit or never receive.
- Encryption at restHow Gitfence encrypts code at rest, what the recovery key opens, what locked means and what is not covered.