git 安装 使用

git 安装
--------------------------------------
yum install git -y

git 下载项目
-------------------------------------
git clone https://git.oschina.net/liu21st/thinkphp5.git mayibang

git 使用
--------------------------------------
git config --global user.name "你的名字或昵称"
git config --global user.email "你的邮箱"
cd 项目目录


git init
git remote add xxx git@git.oschina.net:xielisen/xxx.git

git  oschina ssh
--------------------------------------
ssh-keygen -t rsa -C "xxxxx@xxxxx.com"
# Creates a new ssh key using the provided email
cat ~/.ssh/id_rsa.pub
# ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6eNtGpNGwstc....

ssh -T git@git.oschina.net #测试连接

在git.oschina.net里添加 ssh key。 

原文地址:https://www.cnblogs.com/xielisen/p/6164215.html