Skip to content

Allow use of main as primary branch in edge cases like migrate #281

@pboling

Description

@pboling

🚀 Feature Proposal

Github now defaults to main for new repositories. I'd like to be able to use meta with those repositories. A hybrid approach seems ideal so we don't have to touch legacy repos, so it could work with both main and master. Perhaps it could detect the primary branch name? Or use a preset list of fallbacks, like:

main
master

Motivation

When creating a new repository on Github via the UI the default branch is now main, which doesn't work with meta.

Example

For a new repository, attempting to add it to a meta repo I get this error:

fatal: Remote branch master not found in upstream origin

I'd like to be able to do this:

meta project import projects/the-project git@giturl

and have it work regardless of the primary branch name.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions