Projects, Repository Settings, Visibility, Forks, Protected Resources, and Project Templates: Configuration, Design Choices, and Tradeoffs
Choose project ownership, visibility, initialization, template, fork, and protection patterns deliberately by analyzing security, governance, maintainability, portability, reliability, and cost tradeoffs.
Learning objectives
- Choose between blank, import, built-in template, custom template, fork, and independent-copy approaches based on the lifecycle you actually need.
- Choose project visibility with explicit exposure and offering constraints, including the GitLab.com Internal-visibility boundary.
- Explain why group-owned projects are generally a stronger production ownership model than personal projects for team services.
- Design a fork strategy that distinguishes contribution relationships from one-time scaffolding/copying.
- Build a decision record that considers security, governance, reliability, compatibility, maintainability, performance, and cost without requiring paid features.
1. Configuration starts by naming the source of truth
There is no universally “best” way to create a GitLab project. The correct choice depends on what already exists and which relationship must survive after creation. Begin with one question: where is the authoritative state today? If the answer is an existing local Git repository, create an empty remote and push it. If the answer is another GitLab project that you will contribute back to, a fork is usually the right relationship. If the answer is standardized scaffolding, a template is closer to the intent.
2. Blank, imported, template-derived, or forked?
| Choice | Use it when | Avoid / investigate when |
|---|---|---|
| Blank, empty project | Existing local Git history is authoritative. | Do not independently initialize a README/license on the server unless you plan to reconcile histories. |
| Blank + README | Hosted-first project with no existing local history. | Existing local repo already has its own root commit. |
| Import | You are migrating supported repository/project data from another system or export. | You only need a lightweight starter scaffold. |
| Built-in template | You want a GitLab-provided starter project. | You need organization-specific governance/state. |
| Group custom template | Organization wants standardized project state and has Premium/Ultimate. | Free mandatory learning path; treat as optional design exercise. |
| Fork | You need an explicit upstream contribution relationship. | You want a one-time independent copy with no future upstream semantics. |
3. Visibility is an exposure decision, not a collaboration shortcut
Do not choose Public merely because inviting members feels inconvenient. Visibility and membership solve different problems. A public project intentionally exposes reachable project content to unauthenticated users; a private project requires explicit/inherited access. On Self-Managed and Dedicated, Internal can expose the project to authenticated internal users while excluding external users, subject to administrator policy.
| Decision question | Private | Internal | Public |
|---|---|---|---|
| Intended audience | Explicit members / inherited group members. | Authenticated internal users on supported offerings. | Internet / unauthenticated audience. |
| GitLab.com new projects | Supported. | Not available. | Supported. |
| Self-Managed / Dedicated | Supported. | Supported unless administrator restricts it. | Supported unless administrator restricts it. |
| Typical production default | Strong starting point for proprietary/internal services. | Useful for instance-wide internal collaboration where policy permits. | Open-source/public documentation with deliberate exposure review. |
4. Personal namespace versus group-owned project
A personal namespace is convenient for experiments, but team services usually need ownership that survives an individual developer’s role change or departure. A group-owned project can inherit membership and policy from the group and fits an organizational governance model.
| Dimension | Personal namespace | Group-owned project |
|---|---|---|
| Ownership signal | Centered on one user namespace. | Centered on team/organization namespace. |
| Membership inheritance | Limited compared with group hierarchy. | Can inherit group/subgroup membership and policy. |
| Offboarding | May require transfer and path changes later. | Ownership can remain stable while people change. |
| Production naming | Useful for prototypes/forks. | Usually clearer for durable services and shared automation. |
| Billing / quotas | Depends on offering/account model. | Depends on group/subscription model; verify current limits instead of hard-coding them. |
5. Fork network versus template or independent copy
A fork is a relationship, not just duplicate bytes. GitLab knows the upstream project, and fork-based merge requests can target it. A template-derived project is independent after creation: it may share initial files/history but does not promise upstream synchronization. An independent clone/push is even more explicit: Git history can be identical at one moment while GitLab has no fork relationship at all.
Choose a fork when contribution flow is the point. Choose a template when standardized starting state is the point. Choose an independent copy when separation is the point.
6. Template governance and sensitive copied state
Built-in templates are available across tiers. Group custom project templates are Premium/Ultimate, and instance custom project templates are Premium/Ultimate on Self-Managed/Dedicated. Current documentation also warns that template creation can copy more than files: exportable project settings, issues/MRs, labels, milestones, releases, and CI/CD configuration can be copied, while deploy keys, webhooks, members, and protected-ref access can vary depending on the creator’s permission.
That means “template” is a governance supply chain. Review the template project like a dependency: owners, CI configuration, protected-ref settings, webhooks, keys, stale users, and version/update strategy matter.
7. Protection defaults: preserve the policy intent, not a memorized menu
Basic protected branches/tags are available on Free. More granular protected-branch permissions, group-level protections, and Code Owner requirements can be tier-dependent. The design question is not “which checkbox should I click?” but “which actors should be able to create or mutate critical refs, and through which reviewed path?”
| Ref class | Safe baseline intent | Why |
|---|---|---|
| Default / production branch | Prefer merge-request flow; direct push only where explicitly justified. | Keeps review/CI evidence attached to changes. |
Release tags such as v* |
Restrict creation to release authority. | Prevents accidental or unauthorized release identity creation. |
| Feature branches | Allow developers to iterate; avoid over-protection unless risk requires it. | Keeps development usable while concentrating governance on critical refs. |
8. Worked design scenario: internal payment service
Scenario: a five-person team is starting a private internal payment API. They already have a local Git history, will add CI later, expect engineers to rotate, and do not need public contributions.
| Choice | Decision | Rationale |
|---|---|---|
| Namespace | Group-owned project | Durable ownership and inherited team access. |
| Creation method | Empty blank project, then push existing local history | Avoids unrelated server-side root commit. |
| Visibility | Private | No business need for public discovery; works on all offerings. |
| Template | No mandatory custom template | Free-compatible; adopt standardized files through reviewed commits or optional Premium template later. |
| Fork | No | No upstream contribution relationship is required. |
| Default branch |
main after first push / explicitly configured
|
Predictable CI/release convention. |
| Protection | Inspect and enforce review-oriented default-branch policy | Protects integration path without blocking ordinary feature work. |
| Lifecycle | Archive before delete when retiring | Preserves evidence and reduces irreversible mistakes. |
9. Architecture scorecard
Use this scorecard before approval:
- Maintainability: will paths/ownership remain stable as people change?
- Security: is visibility no broader than the audience, and are critical refs governed?
- Governance: can access and project ownership be audited through a group model?
- Reliability: does the creation method avoid ambiguous/unrelated histories?
- Compatibility: are features available on the actual GitLab offering/tier/version?
- Performance: are we avoiding unnecessary mirroring/import work? Project creation itself rarely needs performance tuning.
- Cost: is the mandatory path Free-compatible, with paid template/governance controls labeled optional?
10. Design exercise: write the project creation ADR before creating it
Create a short architecture decision record with these fields:
namespace, owner,
source_of_truth, creation_method,
visibility, default_branch,
fork_relationship, template_source,
protected_refs_intent,
retirement_strategy, and
offering/tier assumptions. Then ask another learner to
challenge two assumptions. The output is useful even if no GitLab
resource is created.
Knowledge check
A team wants standardized starter files but no ongoing relationship to the source project. Fork or template?
Template. A fork communicates and records an upstream contribution relationship; a template is for standardized starting state.
Why is a group-owned project usually preferable to a personal project for a long-lived service?
The ownership boundary survives individual staffing changes and can inherit group membership/policy, reducing later transfer and path churn.
Can a GitLab.com learner solve an Internal-visibility requirement by asking for a higher project role?
No. Internal visibility is an offering availability constraint for new GitLab.com projects, not a project-role permission issue.
A custom template copies CI configuration and some project state. What security review follows?
Treat the template as a supply-chain/governance input: review CI config, permissions, protected-ref behavior, webhooks/keys handling, owners, and update lifecycle.
Summary
Project configuration is a set of architecture choices: authoritative history, ownership namespace, exposure level, upstream relationship, template source, critical-ref policy, and retirement behavior. Free GitLab supports a complete production-minded learning path; tier-gated templates and granular protections should be selected only when their governance value justifies the dependency.
Official references
- GitLab Docs — Create a project
- GitLab Docs — Project and group visibility
- GitLab Docs — Manage projects
- GitLab Docs — Projects API
- GitLab Docs — Forks
- GitLab Docs — Protected branches
- GitLab Docs — Protected tags
- GitLab Docs — Default branch
- GitLab Docs — Project topics
- GitLab CLI — repo commands
- GitLab Docs — Custom project templates for groups
- GitLab Docs — Project templates for your instance
Keep the academy open
Support free, practical DevOps education.
Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0Send only Ethereum/ERC-20 compatible assets to this
address.