Create a repository you own
Use your own individual or organization account. Enable MFA and keep recovery information secure. A private repository controls access to source but does not make the published public website private.
Store only what belongs in source control
Keep layouts, content, styles, package manifests and a lockfile. Exclude dependency folders, local credentials and private exports. Large media can require separate storage; do not use Git as an unlimited backup for every file.
Connect hosting without granting broad access
Use the native Cloudflare integration and restrict repository selection. A contributor can propose a code change without receiving domain administrator privileges. Document which branch deploys production and review the effect of each push.
Understand optional paid products
GitHub Team currently lists $4 per user per month for advanced collaboration. Codespaces, Copilot, Actions overages and large-file or security products have separate terms. A Pages-native build does not require a paid GitHub Actions plan.
Keep a portable recovery path
Clone your repository and build from a clean checkout. Save external service configuration securely and review permissions when a contractor leaves. Test a previous working commit before you need emergency recovery.
git clone YOUR_REPOSITORY_URL cd YOUR_PROJECT_FOLDER npm ci npm run build
Common questions
Does a private repo cost money?
GitHub Free includes private repositories, with feature and usage limits.
Do I need GitHub Pages?
No. GitHub can store source while Cloudflare Pages serves the site.
References
Provider interfaces and limits can change. Consult the original documentation before changing production settings.