標籤:new load 點擊 test ranch tin spec src pos
使用Eclipse上傳Java工程到github
1.登入github賬戶,Create a new repository(建立一個知識庫)名稱為:eclipse_upload
建立完成之後,跳轉到以下介面。
注意:https://github.com/heyangyi/eclipse_upload.Git地址是待會使用eclipse上傳代碼到知識庫的地址。
2.開啟eclipse建立一個名為:eclipse_upload_git的javaWeb項目。添加index.jsp頁面,在body部分添加Test using eclipse upload source to GitHub
3.右擊項目eclipse_upload_git>Team>Share Project...>選擇Git>Next>
4.右擊項目eclipse_upload_git>Team>Commit...>
Commit之後發現項目下面的檔案右下角由帶問號的標識符變為帶伺服器黃色方格的標識符。
5.右擊項目eclipse_upload_git>Team>Push...>
複製剛才第一步建立的知識庫地址到URL,輸入github的使用者名稱和密碼,Next
在Sourece ref 選擇項master [branch] Destination ref輸入refs/heads/master,點擊Add Spec,點擊Force Update All Specs>finish
6.開啟github網頁進入自己剛剛建立的eclipse_upload知識庫,可以看到將本地剛剛建立的項目上傳到了再github建立的知識庫上。
查看index.jsp檔案,發現裡面的body部分是:Test using eclipse upload source to GitHub
7.修改index.jsp裡面的body部分代碼並上傳到github步驟,右擊項目eclipse_upload_git>Team>Commit...>步驟同第4步驟
8.右擊項目eclipse_upload_git>Team>Push...>(步驟同第5步驟),上傳完成後重新整理一下github網頁進入自己剛剛建立的eclipse_upload知識庫。
使用Eclipse上傳java工程到github