Skip to content

The az repos create command does not respect the default branch name setting in the ADO portal. #27306

@josh-endries

Description

@josh-endries

Describe the bug

The az repos create command does not respect the default branch name setting in the ADO portal.

Related command

az repos create

Errors

N/A

Issue script & Debug output

N/A

Expected behavior

Running az repos create should create a repo with a default branch using the name set in the ADO portal.

Environment Summary

azure-cli 2.42.0 *

core 2.42.0 *
telemetry 1.0.8 *

Extensions:
application-insights 0.1.19
azure-devops 0.26.0
containerapp 0.3.16
log-analytics 0.2.2
logic 0.1.6
resource-graph 2.1.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users....azure\cliextensions'

Python (Windows) 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:37:59) [MSC v.1933 32 bit (Intel)]

Additional context

We have the option set in ADO for default branches to be named "main". When I create a new repo via az repos create --name foo, a repo does get created but with a default "master" branch.

Also, I don't see a CLI option to set which branch name to use when creating the repo. I'm not interested in creating one with master, then creating main, then changing the default to main, if that is even possible via the CLI...

Also also, I tried upgrading viz az upgrade, which uses Python, which launched an MSI, which couldn't complete because Python was running. lol

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botAuto-ResolveAuto resolve by botDevOpsService AttentionThis issue is responsible by Azure service team.act-platform-engineering-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions