git的安装
#下载git
wget https://github.com/git/git/releases/tag/v2.31.1 -O git-v2.31.1.tar.gz
tar -zxvf git-v2.31.1.tar.gz
cd git-v2.31.1
#生成配置文件
meke configure
./configure prefix=/usr/local/git/
make
make install
#添加环境变量,将git指令添加到bash中
cat >>/etc/profile<<EOF
export PATH="/usr/local/git/bin:$PATH"
EOF
source /etc/profile
#查看git指令是否生效
git --version
参考博客:https://www.jianshu.com/p/be7ee68a68a6
git初次使用
配置用户名邮箱
git config --global user.name “你的名字”
git config --global user.email “你的Email”
git config --list 查看