## 一、在本地添加賬號
~~~
ssh-keygen -t rsa -C "yestian@qq.com"
~~~
## 第2步:登陸GitHub,打開“Account settings”,“SSH Keys”頁面:
然后,點“Add SSH Key”,填上任意Title,在Key文本框里粘貼id_rsa.pub文件的內容:
## 三、創建項目
點擊 new repository
填寫標題,創建
## 四、推送內容到遠程
~~~
git remote add origin https://github.com/yestian/mygit.git
git push -u origin master
~~~
第一次提交要帶上 -u參數,以后提交
~~~
$ git push origin master
~~~
## 五、從遠程克隆
需要知道遠程的地址
~~~
git clone https://github.com/yestian/mygit.git
//或者,這種方式更快
git clone git@github.com:yestian/mygit.git
~~~