使用Eclipse上傳java工程到github

來源:互聯網
上載者:User

標籤: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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.