一、git安装:

git下载地址:https://git-scm.com/download

安装,一路默认next即可:
git安装使用 VSCode配置gitpath提交代码_Win10 - 图1

安装成功后,鼠标右键桌面有Git Bash Here:
git安装使用 VSCode配置gitpath提交代码_Win10 - 图2
或者命令行,可查到版本号:

  1. git --version

git安装使用 VSCode配置gitpath提交代码_Win10 - 图3

二、git使用:

1、查看状态:git status
2、添加:git add .
3、提交:git commit -m "提交信息"
4、推送:git push

三、VSCode配置gitpath、提交代码:

1、配置gitpath:
(1)找到为Git安装目录下的gitpath.exe,复制其路径:E:\Git\Git\cmd;
git安装使用 VSCode配置gitpath提交代码_Win10 - 图4
(2)打开vscode设置,搜索git.path,点击:在setting.json中编辑:
git安装使用 VSCode配置gitpath提交代码_Win10 - 图5
git安装使用 VSCode配置gitpath提交代码_Win10 - 图6
设置:"git.path": "E:/Git/Git/cmd/git.exe"
git安装使用 VSCode配置gitpath提交代码_Win10 - 图7
git安装使用 VSCode配置gitpath提交代码_Win10 - 图8

2、提交代码:
如:代码有所改动
git安装使用 VSCode配置gitpath提交代码_Win10 - 图9
点击对号,填写提交信息,并提交:
git安装使用 VSCode配置gitpath提交代码_Win10 - 图10
推送:
git安装使用 VSCode配置gitpath提交代码_Win10 - 图11