在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",

相关推荐
007张三丰1 天前
Git Rebase详解,与merge,cherry-pick比较
git·rebase·rebasing
风静如云1 天前
VSCode:避免打开新文件时会在标签页覆盖旧文件
vscode
之歆1 天前
Bash 循环与函数、Linux 进程管理
linux·chrome·bash
dingdingfish1 天前
Bash学习 - 第6章:Bash Features,第3节:Interactive Shells
bash·shell·interactive
jimy11 天前
GitHub的codespaces入门,以及git设置
git·github
春日见1 天前
如何查看我一共commit了多少个,是哪几个,如何回退到某一个版本
vscode·算法·docker·容器·自动驾驶
西柚云1 天前
告别命令行!在VSCode中直接使用Claude Code编程
服务器·ide·vscode·编辑器·claude
___波子 Pro Max.1 天前
解决vscode code命令找不到问题
vscode
睡醒了叭1 天前
缝缝补补---Git使用
git
Alkaid:2 天前
GIT常用命令
大数据·git