Git - 在Eclipse中將項目上傳到Git中

  • 1、登錄GitLab 中,然後創建一個項目

  • 2、在Eclipse中,項目右鍵 --> Team --> Share Project

  • 3、彈出對話框 --> 選擇Git --> Next

  • 4、彈出對話框 --> 勾選 User or Create repository in parent folder of project

  • 5、對話框佈局刷新 --> 點擊項目列表行

  • 6、按鈕 Create Repository 激活 --> 點擊 Create Repository 按鈕(創建本地庫)

  • 7、至此,本地庫創建完成 --> 點擊 Finish

  • 8、此時,代碼顯示爲未提交(帶>符號)

  • 9、項目右鍵 --> Team --> Commit --> 切出 Git Staging 框 --> 選中 UnStaged Changes 中需要管理的項通過 Add 按鈕添加到 Staged Changed 項中 --> 添加 Commit Message 日誌 --> 點擊 Commit 按鈕

  • 10、至此,項目已提交到本地;複製 GitLab 項目 Http地址;在Eclipse中項目右鍵 --> Team --> Remote --> Push...

  • 11、在彈出框中,填入GitLab地址,補充用戶等信息,Next

  • 12、在切換的彈出框中,選項 Source ref 中選擇 master[branch] 項;點擊 Add All Branches Spec 按鈕;點擊 Finish 

  • 13、等待代碼上傳完成,彈出如下對話框即全部完成

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章