天天看點

eclipse送出項目到github

1.在https://github.com   new repository

2.在eclipse中new project  比如:Test項目

3.右擊"Test"->Team->share project...  ->select a repository type:Git

eclipse送出項目到github

勾選  Use or create repository in parent folder of project

eclipse送出項目到github

點選  Create Repository  ->  Finish

這時候打開在workspace中的Test目錄會發現多了一個.git檔案夾。

4.右擊"Test"->Team->commit 本地送出

5.再右擊"Test"->Team->Remote->Push

eclipse送出項目到github

URI就是github上面指定的位址:

eclipse送出項目到github

username和password就是github網站的使用者名和密碼

5.finish

eclipse送出項目到github

source ref 選擇 refs/heads/master  destination ref會自動填充,點選  Add Spec勾選Focus update

開始送出。

6.可以重新整理網頁檢視送出的代碼了。。。

注:在Eclipse中生public key, 并添加到GitHub Repository中。

     在菜單欄依次打開window → preference → general → network connection → SSH2 →

Key Management → generate RSA Key... → apply → save private key...

eclipse送出項目到github

生成 SSH 的 public key在GitHub中通過:edit your profile -> ssh key -> Add SSH Key 添加SSH Key,