Git 內容總結 二 使用

2021-10-21 04:33:47 字數 642 閱讀 8878

1.本地倉庫

2.本地倉庫的使用

3.版本回退

4.遠端倉庫

5.遠端倉庫的使用

1.本地倉庫

2.本地倉庫的使用

git常用指令操作

檢視當前狀態:git status

新增到快取區:git add 檔名

​ 可以新增乙個檔案,也可以同時新增多個檔案

​ 語法1: git add 檔名

​ 語法2:git add 檔名1 檔名2 檔名3

​ 語法3: git add . 全部新增

提交至版本庫:git commit -m 」注釋內容「

3.版本回退

4.遠端倉庫

5.遠端倉庫的使用

a. 生成公私鑰對指令(須先自行安裝openssh):ssh-keygen -t rsa -c 「註冊郵箱」

實際操作:

$ ssh-keygen -t rsa -c "註冊郵箱"

//一直回車即可

b. 將公鑰上傳到github

c. 執行後續git操作

git 使用總結之詳細步驟二

2.1 配置git git config global user.name your name git config global user.email youremail domain.com 可以如下檢視配置資訊 gitconfig list 2.2 建立乙個本地repository建立乙個名為...

Git使用總結

1.git branch vv 檢視本地分支與遠端分支的關聯關係 2.git push origin localbranch remotebranch 建立遠端分支remotebranch,該遠端分支的內容與localbranch內容一致 3.git push origin remotebranch...

Git使用總結

在linux上安裝git 命令 tar,config,make,sudo make install 在mac os x上安裝git exe程式執行即可 安裝完成後,在開始選單裡找到 git git bash 蹦出乙個類似命令列視窗的東西,就說明git安裝成功!設定使用者名稱 git config g...