我可以强制使用 Visual Studio 2022 > git >打开命令提示符以使用 Git Bash 而不是 cmd?
使用 Visual Studio 2022,我想使用 Git 菜单选项“在命令提示符中打开”来打开 Git Bash 终端,而不是 cmd.exe。
我如何配置 VS 来做到这一点?
Using Visual Studio 2022, I want to use the Git menu option Open In Command Prompt to open a Git Bash terminal as opposed to cmd.exe.
How do I configure VS to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

虽然没有集成到该菜单,但我能够将 git bash 添加到终端窗口。
通过选择查看>终端(或 ctrl + '),然后选择设置 cog 并设置以下内容:
我能够从 VS 中打开 gitbash shell。
请注意,通过将 Shell 位置设置为 C:\Program Files\Git\git-bash.exe,控制台将在其自己的窗口中加载控制台的新实例,方法是将其设置为 C:\Program Files\Git\bin \sh.exe,它集成在终端窗格中。
While not integrating to that menu, I was able to add git bash to the terminal window.
By choosing View > Terminal (or ctrl + ') and then selecting the settings cog and setting the following:
I am able to open a gitbash shell from within VS.
Note, that by setting the Shell location to C:\Program Files\Git\git-bash.exe, the console loads a new instance of the console in its own window, by setting it to C:\Program Files\Git\bin\sh.exe, it is integrated in the Terminal Pane.