Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
412 stars 201 forks source link

[Issue] Use main as default branch on azd pipeline config #735

Closed savannahostrowski closed 2 years ago

savannahostrowski commented 2 years ago

All of our templates use "main" as their default branch. When we create repos on behalf of users via azd pipeline config, we should use this same convention.

image

jongio commented 2 years ago

Can you confirm that your default git branch is main?

vhvb1989 commented 2 years ago

possible duplicate from: https://github.com/Azure/azure-dev/issues/725

vhvb1989 commented 2 years ago

Running azd up clones a template and removes the .git folder (so any branch info or remotes are lost) Then, when running azd pipeline config, git is initiated using default branch master.

If you manually clone a template (git checkout template-url) and run azd pipeline config, you will get an error when trying to push at the end because your origin remote would be set to Azure-Samples url repo. So you need to create a different remote and use it as azd pipeline config --remote-name myRepo

rajeshkamal5050 commented 2 years ago

Closing this in favor of