初次使用GitHub和Git(一)

2021-10-03 23:23:55 字數 953 閱讀 3204

參考:

github中repositories與projects區別

repositories

projects

**倉庫

專案板倉庫就像專案的資料夾

github 上的專案板幫助您組織工作和排列工作的優先順序

git支援https和git兩種傳輸協議,github分享鏈結時會有兩種協議可選。

git使用https協議,每次pull, push都會提示要輸入密碼,使用git協議,然後使用ssh公鑰,這樣免去每次都輸密碼的麻煩。

大多數 git 伺服器都會選擇使用 ssh 公鑰來進行授權。系統中的每個使用者都必須提供乙個公鑰用於授權,沒有的話就要生成乙個。生成公鑰的過程在所有作業系統上都差不多。首先你要確認一下本機是否已經有乙個公鑰。

.ss**件夾預設存放位置為:c:\users\administrator.ssh

$ git config --global user.name 「這裡面填你的名字」

$ git config --global user.email 「註冊git的郵箱」

命令列輸入:

$ ssh-keygen -t rsa -c 「填註冊git時的郵箱」

新增公鑰到你的遠端倉庫(github)

複製/c/users/master/.ssh/id_rsa.pub中金鑰

在github中的settings->ssh->new sshkey貼上金鑰

檢測。git bush中輸入:

$ ssh -t [email protected]

如果如下,成功

Git和Github初次使用

使用github步驟 1 申請github帳戶 建立名為new project的新repository 2 安裝git客戶端 linux yum install git git gui 3 生成金鑰對,這樣專案可以push到 github上 ssh keygen t rsa c gmail.com ...

github初次使用

1 mkdir gitrepo 建立本地的倉庫資料夾 2 cd gitrepo 進入該長褲資料夾 3 git init 初始化本地倉庫 4 git add 新增要push到遠端倉庫的檔案或資料夾 5 git commit m first commit 提交剛剛新增的檔案,提交到本地倉庫 6 git ...

GIT初次使用

遠端倉庫 分支管理 標籤 版本號 windows建立目錄不得有中文,防止亂碼最好用nodepad 設定編碼為utf 8進行編輯 1 建立目錄 在git bash.exe視窗中寫入,mkdir cataloguename 2 進入目錄,cd cataloguename 3 檢視目錄,pwd 4 設定為...