1.1、下载并安装git到电脑
1.2、Git环境变量配置
编辑系统环境变量 -> 高级 -> 环境变量->编辑系统变量Path -> 新建
git --version // cmd中查看版本检查 git 是否安装成功
// 全局 git 信息配置
git config --global user.name "用户名" // 用户名为git账号用户名
git config --global user.email "邮箱" // 邮箱为git账号邮箱git config --global user.password "password " // password 为git账号密码
// 查看配置
git config --list
1.3、VsCode配置
设置->搜索 git.path -> 在settings.json中编辑->
"git.path": "路径", // 路径为git.exe所在文件夹 如 D:/软件/Git/bin/git.exe
// 在VsCode中使用git总是要求输入用户名和密码,可以在输入用户名和密码之后输入命令
git config --global credential.helper store