一、选中文件–>首选项–>设置
二、搜索git,找到setting.json
三、在setting.json中添加"git.path":“D:/soft/git/Git/bin/git.exe”
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210201165439869.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1poZW5nX3hpbmxl,size_16,color_FFFFFF,t_70#pic_center)
四、git bush中设置Git 全局设置:
git config --global user.name “用户名”
git config --global user.email “用户邮箱”
注意,自己写用户名的时候不需要加“”号。否则就会出现下面情况:
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210201165643676.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1poZW5nX3hpbmxl,size_16,color_FFFFFF,t_70#pic_center)
五、设置让VSCode记住git账号和密码
git config --global credential.helper store