Skip to content

Suppress hint: Using 'master' as the name for the initial branch. This default branch name #427

Open
@jsoref

Description

@jsoref
Contributor

Downstream consumers of actions shouldn't see noise about that git itself is changing its default branch. When actions/checkout is used, it will be given a specific branch (or similar) to check things out...

Run actions/checkout@v2.0.0
  with:
    fetch-depth: 2
    repository: org/repo
    token: ***
    persist-credentials: true
    clean: true
    lfs: false
Syncing repository: org/repo
Working directory is '/home/runner/work/org/repo'
/usr/bin/git version
git version 2.30.0
Deleting the contents of '/home/runner/work/org/repo'
/usr/bin/git init /home/runner/work/org/repo
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in /home/runner/work/org/repo/.git/

Activity

added a commit that references this issue on Mar 24, 2021
linked a pull request that will close this issue on Mar 24, 2021
snowshoes

snowshoes commented on Jan 31, 2022

@snowshoes

Git should not mess political correctness sht with open source world, you are correcting nothing but sht

added a commit that references this issue on Jun 7, 2023
MestreLion

MestreLion commented on Nov 28, 2024

@MestreLion

@snowshoes this issue has nothing to do about "political correctness sht", but rather about suppressing a rather verbose 10-line useless warning, which can be easily done by actions/checkout by simply setting the hinted git config global setting to a dummy name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @MestreLion@jsoref@snowshoes

      Issue actions

        Suppress hint: Using 'master' as the name for the initial branch. This default branch name · Issue #427 · actions/checkout