Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Default branch name of new git repositories is master, despite init.defaultbranch settings #2755

@TomVincentUK

Description

@TomVincentUK

Prerequisites

Description

When creating a new git repository via the built in Atom GUI, the default branch name is master, even though my default git branch name (init.defaultbranch) is main when invoking git from a terminal.

Steps to Reproduce

  1. Open Atom in a new directory
  2. Create a new git repository using the Create repository button
  3. Add a file and make the first commit to the repository using the Create detached commit button
  4. Check the name of the created branch

Expected behavior:

The branch created should be named to match either init.defaultbranch from the user's gitconfig, or to main (to match the default behaviour for new github repositories).

Actual behavior:

The default branch is named master

Reproduces how often:

100%

Versions

Windows 10

> atom --version

Atom    : 1.60.0
Electron: 9.4.4
Chrome  : 83.0.4103.122
Node    : 12.14.1
> apm --version
apm  2.6.2
npm  6.14.13
node 12.14.1 x64
atom 1.60.0
python 3.9.1
git 2.33.1.windows.1
visual studio

Additional Information

My Stack Overflow post on this topic: issue was reproduced on Ubuntu by other user

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions