不同的系统不同的安装命令,基础的就不说来,centos直接yum就ok。 安装完成后,还需要最后一步设置,在命令行输入: git config --global user.email "you@exampl om" git config --global user.name "Your Name"