VS Code 扩展将参数传递给 git 命令

发布于 2025-01-13 22:06:40 字数 241 浏览 3 评论 0原文

我正在构建 Visual Studio Code 扩展并尝试将参数传递给 git 命令,但参数未传递,并且我仍然收到命令提示框,要求输入分支名称。我做错了什么?

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

我认为这会绕过用户输入并继续从“main”分支创建一个名为“myBranch”的分支。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文