Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ng new]: define main as inital branch name or make it configurable #27313

Open
willi84 opened this issue Mar 18, 2024 · 1 comment
Open

[ng new]: define main as inital branch name or make it configurable #27313

willi84 opened this issue Mar 18, 2024 · 1 comment
Labels
area: devkit/schematics freq1: low Only reported by a handful of users who observe it rarely severity2: inconvenient type: bug/fix

Comments

@willi84
Copy link

willi84 commented Mar 18, 2024

Command

new

Description

background:

  • When you have a fresh installed system and not yet configured the main branch it will use master and git complains about using "master" as branch name.
  • discovered while preparing the ngGirls workshop, so it would be awesome to not have another command to avoid this warning.

to follow these best practises of e.g. using main, it would be awesome, when the following command

npx @angular/cli@latest new todo-list

is executed.

image

Describe the solution you'd like

  • creating by default a "main" branch
  • make an option to choose the initial branch

Describe alternatives you've considered

configure git branch like written, but for beginners it would be easier to skip this step

@alan-agius4 alan-agius4 added type: bug/fix freq1: low Only reported by a handful of users who observe it rarely area: devkit/schematics severity2: inconvenient labels Mar 19, 2024
@alan-agius4
Copy link
Collaborator

I spoke with @clydin about this. We could verify if "defaultBranch" is undefined and then use "main" for initialization. However, we shouldn't impose "main" as the branch name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: devkit/schematics freq1: low Only reported by a handful of users who observe it rarely severity2: inconvenient type: bug/fix
Projects
None yet
Development

No branches or pull requests

2 participants