在vscode中配置git bash终端、git 源码管理

  1. 打开vscode
  2. 文件->首选项->设置,打开设置
  3. 搜索shell windows
  4. 将以下配置添加到vscode中的settings.json中

注意:

  • terminal.integrated.profiles.windows这个配置项是就是添加终端的
  • terminal.integrated.defaultProfile.windows这个是配置默认选项的
  • git bash终端的名字得是'Git-Bash',不能是"Git Bash",否则vscode检测不到;
  • path是git执行路径,path和source不能共存!如果有source,就不要用path;source是git的默认安装路径,如果 Git 不是安装在默认路径,则需要把"source":"Git Bash"替换为"path": Git的安装路径\bin\bash.exe 。注意,不是 git-bash.exe 的路径,是 bash.exe 的路径!
  1. 配置VScode中的git
    在 settings.json 文件中,添加 git 的安装路径

    "git.path": "D:\install\git\Git\bin\git.exe",

相关推荐
一只积极向上的小咸鱼5 小时前
嵌套 Git 仓库 / gitlink / submodule 问题总结
大数据·git·elasticsearch
LuDvei6 小时前
git拉取报错问题
git
程序猿多布7 小时前
Fork操作笔记
git·fork
荪荪7 小时前
在本地建立git仓库
git
OYangxf7 小时前
Git Rollback, Reset and Restore的使用
git
AIMath~8 小时前
git管理代码仓库的工具
git
techdashen13 小时前
为 Agent 重新设计的 Git:Cloudflare Artifacts 是什么,怎么工作的
git
赖在沙发上的熊13 小时前
Git多仓库协作中和并冲突问题:“不相关历史合并”+“问跟踪文件冲突”
git
shimly12345614 小时前
vscode 很难删除 copilot,如何关闭 copilot 功能?
ide·vscode·copilot
风若飞14 小时前
▎ 适用于完全没有 Git 经验的新手
git