Skip to content

How to know which is the default branch #1365

@dsharma522

Description

@dsharma522

Discussed in #1364

Originally posted by dsharma522 October 21, 2021
How one can one which is the default branch? main/master?

One can know about this by iterating all heads and then manually check , but that is also have one issue.
What if a repository has both the branches as their branch, which means master, main are some branch and default branch could be one of these or something else.

How to get the default branch ?

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