能够登陆git官网下载安装
Git 官方文档地址:
https://git-scm.com/book/zh/v2
macOS 平台 Git 下载地址:
https://git-scm.com/download/mac
Windows 平台 Git 下载地址:
https://git-scm.com/download/win
Linux 平台 Git 下载地址:
https://git-scm.com/download/linux
检查安装结果:下载好以后按照提示进行安装,安装完毕后在终端使用git --version命令,看是否返回 git 的版本linux
安装好git后须要进行最小配置(设置用户名和邮箱)才能够正常使用git
配置user.name和user.email
git config --global user.name 'your_name'
$ git config --global user.email 'your_email@domain.com'git
config默认参数为local
git config --local(只对当前仓库有效,且须要在仓库目录下进行设置)
git config --global(global对登陆⽤户全部仓库有效(经常使用))
git config --system(对系统的全部⽤户有效)
显示 config 的配置:加 --list,例如git config --list --local
清除 config 的配置:加 --unset,例如git config --unset --local user.name
优先级:local > global > system(如在global配置中包含A仓库,而且A仓库配置了local,则相关操做会使用local配置的信息执行)dom