GitHub学习之路1

对于代码的管理以及维护上,GitHub不失为一个较为明智的选择。而对于GitHub的灵活应用也是相当重要的,以下记录为以防自己忘记。

1. 创建SSH Key

ssh-keygen -t rsa –C “youremail@example.com”

需要注意的是:id_rsa是私钥,不能泄露出去,id_rsa.pub是公钥,可以放心地告诉任何人。

2. 添加远程库

git remote add origin https://github.com/user.name/yourgit.git

3. 同步本地库

git push origin master

4. 克隆远程库

git clone https://github.com/user.name/yourgit.git
原文地址:https://www.cnblogs.com/chenguanfu/p/4288924.html