git 设置

centos服务器版本是是7

安装git: yum install git  版本是

git version 1.8.3.1

1.配置git: 

git config --global user.name "xxxx"

git config --global user.email xxxx@xxxx.com

git config --list

2.生成.ssh中id_rsa

ssh-keygen -t rsa -C "邮箱"

将id_rsa.pub 粘贴到git中

3.clone远程分支的项目

git clone -b branchName 项目地址

4.更新npm 到最新的npm

npm install npm@latest -g

5.git 更新代码

git pull 

6.安装 unzip和zip

yum install -y unzip zip

原文地址:https://www.cnblogs.com/jay--zhang/p/7110012.html