在centos上安装git: centos操作系统上安装命令不是:apt-get,而是yum 输入如下命令: yum install git 检查版本号: git --version 出现图示,则安装成功。