GIT-远程仓库

在github新建仓库

配置SSH Key

* 查看本地ssh key

$cd ~/.ssh $ls

* 如果没有sshkey,生成sshkey
$ssh-kengen -t rsa -C "your email" -t:type -C:注释文字 -f:指点文件名

* 生成 id_rsa 和 id_rsa.pub 两个秘钥文件。复制id_rsa.pub的内容到github.

把本地仓库关联到Github远程仓库:

关联远程仓库;
git remote add origin <仓库名>
把本地仓库推送到远程仓库,第一次推送要 -u 参数,之后推送不用 -u
git push -u origin master

  • 克隆远程仓库到本地
    git clone <GitHub仓库名>
posted @ 2019-06-29 14:39  Lianstyle  阅读(394)  评论(0)    收藏  举报