本地項目上傳到GitHub

來源:互聯網
上載者:User

標籤:nod   git bash   github   mit   上傳   java   comm   alt   技術分享   

之前在github上搭建了前端node方面的東西,現在本地添加了maven結構的java代碼,嘗試了本地上到github項目分支的指令,現記錄下

1.開啟Git Bash

2.進入到項目所在的路徑

3.輸入git init

4.提交內容到git本地倉庫

git add [files] -- 要上傳的檔案夾名

git commit -m files

5.建立分支

git checkout -b 分支名字

6.添加遠程倉庫

git remote add origin [email protected]:[github名字]/[項目名]

7.push到遠程倉庫

git push -u origin 分支名字

8.重新整理github上項目頁面,會發現多了一個分支,並已有上面提交的內容

本地項目上傳到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.