一、GIt的安装与配置
1、安装
访问地址【https://git-scm.com/book/】

点击安装》》根据自己的系统进行下载

下载完成后安装即可,检验是否安装成功:

出现版本号即为安装成功
2、配置
打开Git Bash 进行相关配置:

2.1配置 user.name 和 user.email:
$ git config --global user.name 'user_name'
$ git config --global user.email 'user_name'
config 的三个作用域:(缺省 == local)
local :只对某个仓库有效
global :对当前用户的所有仓库有效
system :对系统所有登录的用户都有效(不常用)
2.2查看配置信息:
$ git config --list :列出当前所有配置
$ git config <key>:查看某项具体配置:例如:git config user.name
2.3设置默认文本编辑器:
git config --global core.editor ‘your_editorName’
例如:git config --global core.editor ‘Code’//VScode
网友评论