Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • See what's new at GitLab
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab
GitLab
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 29,492
    • Issues 29,492
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 1,135
    • Merge Requests 1,135
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issues
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #221013

Closed
Open
Opened Jun 10, 2020 by James Ramsay@jramsay
  • Report abuse
  • New issue
Report abuse New issue

Add instance setting for default branch name for new repositories

Problem to solve

When creating a new repository with Git (including via GitLab), by default a branch is created that is named master. A branch is needed before commits can be added to it.

We should support the use of a different default branch by allowing instance administrators to choose their own default branch name to something like main because:

  1. master is not easily understood by people new to Git, and is not a ubiquitous term in technology (master is more easily associated with primary/secondary configurations)
  2. master may reference the master/slave terminology used by BitKeeper. Use of master/slave terminology has been removed in recent versions of many major software projects because it is not technically descriptive, precise, and avoids needlessly referencing the awful history and impact of human/slavery which continues to be felt by people all over the world.

This would also allow GitLab to select a new default in future for new self-hosted instances #221164.

Further details

Proposal

An Instance Administrator should be able to set the default branch name for the entire instance. All newly created projects should inherit this default.

For compatibility, the default value should be master. This can be changed in a future version of GitLab after proper communication.

image

Links / references

https://lore.kernel.org/git/[email protected]/T/#ma9a4da070ddf8ff87729960bb31ce2a8776c73c1

Edited Jun 16, 2020 by Daniel Gruesso

Linked issues

  • Discussion
  • Designs
Assignee
Assign to
Backlog
Milestone
Backlog
Assign milestone
Time tracking
None
Due date
None
7
Labels
Accepting merge requests Category:Source Code Management Inclusion devopscreate feature groupsource code repository
Assign labels
  • View project labels
Reference: gitlab-org/gitlab#221013