1. 程式人生 > 其它 >多測師肖老師_git版本控制器之使用(3.2.3)

多測師肖老師_git版本控制器之使用(3.2.3)

1、開啟git介面,如下圖

選擇git base,開啟介面,git base可以使用linux命令操作

2、找一個路徑,建立一個倉庫 (git init)

cd 碟符

例如:cd d

git init

3、進行使用者設定

我在github上測試賬號:

賬號:xlh1314

郵箱:[email protected]

4、檢視倉庫當前配置

5、建立一個檔案

6、git status 檢視當前檔案的狀態

7、git add 將程式碼新增到 暫存區

8、git status 檢視diama檔案的狀態

9、git commit -m 程式碼包 暫存區提交到版本庫

一個檔案====git add===(暫存區)====git commit m====(版本庫)

===================================================

github操作

url:https://github.com/

(1)註冊:

(2)登入:

(3)新建遠端倉庫

4、遠端倉庫連線:

ssh:[email protected]:xlh1314/hz15.git

https:https://github.com/xlh1314/hz15.git

5、設定本地倉庫和遠端倉庫連線

以上是填寫祕鑰的地方;

6、生成祕鑰

(1)在git中輸入命令

Ssh-keygen

複製祕鑰在填寫在github上

7、將git和github進行連線

git remote add origin [email protected]:xlh1314/hz15.git

8、git push -u origin master

9、git pull origin master