microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.31k stars 28.9k forks source link

"Git: Initialize Repository" still creates default branch as `master` instead of `main` #179658

Closed aaronsteers closed 1 year ago

aaronsteers commented 1 year ago

Type: Bug

  1. Open command pallatte.
  2. Select Git: Initialize Repository.
  3. Note default branch is master.

Furthermore, because nothing has been committed yet, I can't change the branch name until after I commit to the branch.

Since GitHub is already defaulting to main now as default branch, can we do the same here?

VS Code version: Code 1.77.1 (b7886d7461186a5eac768481578c1d7ca80e2d21, 2023-04-04T23:23:33.779Z) OS version: Darwin x64 22.3.0 Modes: Sandboxed: Yes

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|6, 5, 8| |Memory (System)|32.00GB (0.65GB free)| |Process Argv|--crash-reporter-id b328cbe7-4366-4d96-b7a8-ea2cffcf0532| |Screen Reader|no| |VM|0%|
Extensions (112) Extension|Author (truncated)|Version ---|---|--- html-snippets|abu|0.2.1 Bookmarks|ale|13.3.1 vscode-sqlite|ale|0.14.1 cucumberautocomplete|ale|2.15.2 vscode-dbt|bas|0.5.1 github-markdown-preview|bie|0.3.0 markdown-checkbox|bie|0.4.0 markdown-emoji|bie|0.3.0 markdown-footnotes|bie|0.1.1 markdown-mermaid|bie|1.18.1 markdown-preview-github-styles|bie|1.0.1 markdown-yaml-preamble|bie|0.1.0 vscode-tailwindcss|bra|0.9.11 vscode-importmagic|bra|0.2.5 sqltools-athena-driver|bru|0.3.0 better-toml|bun|0.3.2 ruff|cha|2023.12.0 vscode-sql-beautify|cla|0.3.19 vscode-svgviewer|css|2.0.0 quick-run-panel|dav|0.0.3 vscode-markdownlint|Dav|0.49.0 vscode-eslint|dba|2.4.0 vsc-invoke|dch|0.0.12 git-commit-no-verify-action-button|Dev|0.0.1 python-preview|don|0.0.4 githistory|don|0.6.20 python-environment-manager|don|1.0.4 vscode-sqlfluff|dor|2.2.7 xml|Dot|2.5.1 parquet-viewer|dvi|2.2.2 gitlens|eam|13.5.0 json-tools|eri|1.0.2 prettier-vscode|esb|9.10.4 vscode-github-notifications-bell|fab|2.3.1 code-runner|for|0.12.0 vscode-chatgpt|gen|4.0.2 codespaces|Git|1.14.4 copilot|Git|1.79.10634 copilot-labs|Git|0.12.791 remotehub|Git|0.54.0 vscode-github-actions|git|0.25.4 vscode-pull-request-github|Git|0.63.2023041009 go|gol|0.38.0 gc-excelviewer|Gra|4.2.57 todo-tree|Gru|0.0.224 vscode-drawio|hed|1.6.6 beautify|Hoo|1.5.0 gzipdecompressor|Hyu|1.2.0 vscode-dbt-power-user|inn|0.11.6 jbockle-format-files|jbo|3.4.0 svg|joc|1.5.2 kite|kit|0.147.0 restructuredtext|lex|189.3.0 vs-color-picker|lih|1.0.0 marp-vscode|mar|2.5.0 rainbow-csv|mec|3.6.0 dotenv|mik|1.0.1 ecdc|mit|1.8.0 vscode-docker|ms-|1.24.0 black-formatter|ms-|2023.2.0 python|ms-|2023.6.0 vscode-pylance|ms-|2023.4.10 remote-containers|ms-|0.288.0 remote-ssh|ms-|0.100.0 remote-ssh-edit|ms-|0.84.0 remote-wsl|ms-|0.77.0 vscode-remote-extensionpack|ms-|0.24.0 azure-repos|ms-|0.30.0 live-server|ms-|0.4.7 makefile-tools|ms-|0.6.0 powershell|ms-|2023.3.3 remote-explorer|ms-|0.4.0 remote-repositories|ms-|0.32.0 remote-server|ms-|1.0.0 vscode-github-issue-notebooks|ms-|0.0.128 vsliveshare|ms-|1.0.5834 vsliveshare-audio|ms-|0.1.93 sqltools|mtx|0.27.1 sqltools-driver-sqlite|mtx|0.5.0 resourcemonitor|mut|1.0.7 color-highlight|nau|2.5.0 vscode-streamdeck|nic|4.1.6 vscode-pylens|nin|0.1.6 autodocstring|njp|0.6.1 vetur|oct|0.37.3 material-icon-theme|PKi|4.26.0 duckdb-sql-tools|Ran|1.0.2 vscode-data-preview|Ran|2.3.0 vscode-thunder-client|ran|2.6.1 vscode-commons|red|0.0.6 vscode-yaml|red|1.12.2 vscode-coverage-gutters|rya|2.10.4 jinjahtml|sam|0.20.0 code-settings-sync|Sha|3.4.3 sql-bigquery|shi|1.9.0 vscode-zipexplorer|sle|0.3.1 snooty|sno|0.10.0 code-spell-checker|str|2.20.4 svelte-vscode|sve|107.3.0 markdowntable|Tak|0.10.4 ayu|tea|1.0.5 vscode-make|tec|1.0.2 reorder-python-imports|the|0.2.0 html-preview-vscode|tht|0.2.5 simple-rst|tro|1.5.2 intellicode-api-usage-examples|Vis|0.2.7 vscodeintellicode|Vis|1.2.30 vscode-icons|vsc|12.3.0 volar|Vue|1.2.0 markdown-all-in-one|yzh|3.5.1 meltano-power-user|z3z|0.1.0 material-theme|zhu|3.15.8 (12 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vsdfh931:30280409 vshan820:30294714 vstes263cf:30335440 pythondataviewer:30285071 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593:30376534 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 pynewext54:30695312 azure-dev_surveyone:30548225 nodejswelcome1:30587005 3biah626:30602489 pyind779:30671433 f6dab269:30613381 pythonsymbol12:30671437 vsctsb:30705553 pythonb192:30669360 defaultazurewalk:30687958 pythonms35:30701012 j16hj152:30706079 pythonfmttextcf:30710682 pythonclientmvcf:30708686 ```
gjsjohnmurray commented 1 year ago

I think you can already make this your default by running this command:

git config --global init.defaultBranch main
lszomoru commented 1 year ago

Closing as duplicate of #118182.