Change:
Type: <bBug</bGo to 'Source control' and click 'Initialize Repository'. An error message shows "Git:unknown switch 'b'". VS Code version: Code 1.79.2 (, 2023-06-14T08:57:04.379Z) OS version: WindowsNT x64 10.0. Modes: <details<summarySystem Info</summary </details<details<summaryExtensions (1)</summaryExtensionVersion ------ LiveServer5.7.9 </details<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
Having the same issue after a recent update this morning. Version: 1.79.2 Date: 2023-06-14T08:58:52.392Z (1 day ago) Electron: 22.5.7 Chromium: 108.0.5359.215 16.17.1 V8: 10.8.168.25-electron.0 OS: Darwin x64 22.5.0
Could you please share the contents of the ? Thanks!
I encountered the same issue.... Output from GIT: 2023-06-16 10:31:06.946 [info] git init -b main [4ms] 2023-06-16 10:31:06.946 [info] error: unknown switch `b' usage: git init [-q | --quiet] [--bare] [--template=<template-directory] [--shared[=<permissions]] [<directory] --template <template-directorydirectory from which templates will be used --bare create a bare repository --shared[=<permissions] specify that the git repository is to be shared amongst several users -q, --quiet be quiet --separate-git-dir <gitdirseparate git dir from working tree 2023-06-16 10:33:13.422 [info] git rev-parse --show-toplevel [1ms] 2023-06-16 10:33:13.422 [info] fatal: not a git repository (or any of the parent directories): .git
Yes, that's the exact same Output received.
Could you please share the version of git that you are using? Thank you!
!

Discussion:
}, "git.defaultBranchName": { "type": "string", <del> "description": "%config.defaultBranchName%", </del> <ins> "markdownDescription": "%config.defaultBranchName%", </ins> "default": "main", "scope": "resource" },

"default": 50, "minimum": 0, "maximum": 100, <del> "description": "%config.similarityThreshold%", </del> <ins> "markdownDescription": "%config.similarityThreshold%", </ins> "scope": "resource" } }

"config.checkoutType.local": "Local branches", "config.checkoutType.tags": "Tags", "config.checkoutType.remote": "Remote branches", <del> "config.defaultBranchName": "The name of the default branch (ex: main, trunk, development) when initializing a new git repository. When set to empty, the default branch name configured in git will be used.", </del> <ins> "config.defaultBranchName": "The name of the default branch (ex: main, trunk, development) when initializing a new git repository. When set to empty, the default branch name configured in git will be used. **Note:** Requires git version `2.28.0` or later.", </ins> "config.branchPrefix": "Prefix used when creating a new branch.", "config.branchProtection": "List of protected branches. By default, a prompt is shown before changes are committed to a protected branch. The prompt can be controlled using the `#git.branchProtectionPrompt#`  setting.", "config.branchProtectionPrompt": "Controls whether a prompt is being shown before changes are committed to a protected branch.",

"config.publishBeforeContinueOn.always": "Always publish unpublished git state when using Continue Working On from a git repository", "config.publishBeforeContinueOn.never": "Never publish unpublished git state when using Continue Working On from a git repository", "config.publishBeforeContinueOn.prompt": "Prompt to publish unpublished git state when using Continue Working On from a git repository", <del> "config.similarityThreshold": "Controls the threshold of the similarity index (i.e. amount of additions/deletions compared to the file's size) for changes in a pair of added/deleted files to be considered a rename.", </del> <ins> "config.similarityThreshold": "Controls the threshold of the similarity index (i.e. amount of additions/deletions compared to the file's size) for changes in a pair of added/deleted files to be considered a rename. **Note:** Requires git version `2.18.0` or later.", </ins> "submenu.explorer": "Git", "submenu.commit": "Commit", "submenu.commit.amend": "Amend",

async init(repository: string, options: InitOptions = {}): Promise<void> { const args = ['init']; <del> if (options.defaultBranch && options.defaultBranch !== '') { </del> <ins> if (options.defaultBranch && options.defaultBranch !== '' && this.compareGitVersionTo('2.28.0') !== -1) { </ins> args.push('-b', options.defaultBranch); }