git进阶(远程仓库github)
阅读时间:全文 118 字,预估用时 1 分钟
创作日期:2017-04-01
上篇文章:git进阶(分支与标签管理)
下篇文章:git入门命令(只涉及本地仓库管理)
BEGIN
ssh-keygen -t rsa -C "youremail@example.com" //会生成.ssh文件夹,内有两个文件分别存储了私钥和公钥,公钥用于和github认证
//在github创建项目,比如f7-dome
git remote add origin https://github.com/yougithubname/f7-dome.git //本地仓库与github上的f7-dome仓库关联
git remote rm origin //取消关联
git push -u origin master //将本地仓库(master)的文件推送到远程仓库,-u指第一次推送,后使用可省略
git clone git@github.com:yougithubname/f7-dome.git //克隆远程仓库到本地
FINISH
上篇文章:git进阶(分支与标签管理)
下篇文章:git入门命令(只涉及本地仓库管理)