使用git遠端倉庫

2021-08-20 19:30:17 字數 672 閱讀 8597

第1步:建立ssh key。在使用者主目錄下,看看有沒有.ssh目錄,如果有,再看看這個目錄下有沒有id_rsaid_rsa.pub這兩個檔案,如果已經有了,可直接跳到下一步。如果沒有

ssh-keygen -t rsa -c "[email protected]"

第2步:登陸github,進入settings-->ssh and gpg keys-->new ssh key,填上任意title,在key文字框裡貼上id_rsa.pub檔案的內容

第3步:建立乙個新的倉庫並將之與本地倉庫關聯

git remote add origin [email protected]:michaelliao/learngit.git
第4步:將本地倉庫推送到遠端倉庫

第一次推送:

git push -u origin master
之後的推送

git push origin master
從遠端倉庫轉殖

git clone [email protected]:michaelliao/gitskills.git

git 入門 git遠端倉庫使用

官方文件 要參與任何乙個 git 專案的協作,必須要了解該如何管理遠端倉庫。遠端倉庫是指託管在網路上的專案倉庫,可能會有好多個,其中有些你只能讀,另外有些可以寫。同他人協作開發某個專案時,需要管理這些遠端倉庫,以便推送或拉取資料,分享各自的工作進展。管理遠端倉庫的工作,包括新增遠端庫,移除廢棄的遠端...

GIT遠端倉庫的使用

git remotebixiaopeng bixiaopengtekimacbook pro wirelessqa git remote origin git remote vbixiaopeng bixiaopengtekimacbook pro wirelessqa git remote v o...

GIT遠端倉庫的使用

git remotebixiaopeng bixiaopengtekimacbook pro wirelessqa git remote origin git remote vbixiaopeng bixiaopengtekimacbook pro wirelessqa git remote v o...