'VS Code extension passing arguments to git commands

I'm building a Visual Studio Code extension and trying to pass argument to a git command but the arguments aren't passed and I still get the command prompt box asking for the branch name. What am I doing wrong?

vscode.commands.executeCommand('git.branchFrom','myBranch', 'main');

I thought this would bypass user input and go ahead and create a branch called 'myBranch' from the 'main' branch.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source