git - 将 MINGW64 集成到 Visual Studio 代码中
问题描述
从https://code.visualstudio.com/docs/editor/integrated-terminal,我已经能够将 shell 放在 shell 选项中,但是当我选择它时,它会弹出一个与 VSCode 终端分开的新窗口。我该如何解决这个问题?
这就是我在settings.json中所做的:
"terminal.integrated.profiles.windows": {
...
"MINGW64": {
"path": "C:\\msys64\\mingw64.exe"
}
}
我也有问题git。我从msys2安装了git作为一个包。我已经设置了所有基本参数。git config
但是当我尝试时git config --global -e
,它给出了一个错误:
hint: Waiting for your editor to close the file... code --wait: line 1: code: command not found error: There was a problem with the editor 'code --wait'.
所以我在cmd中进行了尝试,它起作用了。where code
也只在cmd工作。
所以我想知道会是什么问题。会不会有什么关系PATH
?还是与上述问题有关?
解决方案
所以我在cmd中尝试了它,它起作用了。其中代码也只能在 cmd 中工作。
除了它code.cmd
是实际执行的。
在 bash 会话中,检查$PATH
引用是否与 CMD 中的文件夹相同。
还可以考虑直接使用Git For Windows:您可以将其添加git bash
到 VSCode
在 .bashrc 中:
export PATH=$PATH:"/C/Users/User1/AppData/Local/Programs/Microsoft VS Code/bin"
推荐阅读
- reactjs - 我可以在 JSX 中直接使用 React 钩子作为道具吗?
- php - 检查 Timber 中是否存在树枝模板
- php - SQL 语法错误 MariaDB 服务器版本,用于在 ('$fname', '$lname') 附近使用正确的语法
- java - 如何在java中迭代Hash Map对象时更新/设置新值
- python - 在熊猫数据框中切片两个单独的列组
- android - 三星mirrorlink证书问题
- powerbi - Power BI 和 Autodesk Forge
- c++ - 具有最小差异的两个子集
- angular - 基于服务返回 observable 的加载指示器
- c# - 客户端的连接方法在读取服务器的响应时卡住