git+github上傳與管理

來源:互聯網
上載者:User

標籤:log   管理   ash   use   郵箱   pull   斷行符號   config   origin   

1、首先下載並安裝git,方便管理github上的代碼

https://git-scm.com/downloads

2、然後點擊安裝好的git bash(註冊好自己的github)

 git config --global user.name "賬戶名"
 git config --global user.email "郵箱"

3、接著需要你的秘鑰ssh

ssh-keygen -t rsa -C "郵箱"

輸入完就一定點斷行符號就好,不用管。

然後找到裡面提示的檔案夾裡的檔案有個秘鑰檔案

4、開啟Github,進入Settings:在ssh秘鑰那裡建立秘鑰把剛剛的秘鑰檔案的內容複寫進去,名字隨便你改

5、完了之後你測試一下串連上沒有(如果出現你的使用者名稱就是好了)

ssh -T [email protected]

6、在github裡建立倉庫,擷取裡面的網址或者秘鑰,然後cd進入你本地的檔案夾

git init
git remote add origin 你複製的地址

以上關聯已經完成!

接下來不需要知道的太多了,需要上傳和下載就好了吧!

1、所有下載到本地

git pull origin master

2、所有上傳到倉庫

(1)提交到暫存區

git add .

(2)說明上傳情況

git commit -m "提交說明"

(3)最後上傳到伺服器

git push origin master

 

git+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.