git基本命令

2021-08-06 06:33:06 字數 519 閱讀 1075

1、轉殖伺服器上的專案

git clone http://...
2、設定git

git config --global user.name "your_username"

git config --global user.email [email protected]

3、合併分支

git status      檢視當前狀態

git checkout dev 切換到dev分支

git merge dev 合併dev分支到當前分支

git merge --abort merge成功後,push與pull衝突,使用此命令後可以先pull再push

4、檢視歷史紀錄以及退出

git log

--author=name 檢視歷史提交記錄

退出:在英文狀態下按q

git 基本命令

man git man git commit man git pull man git merge git config global user.name yourname git config global user.email yourname example.com cd home git m...

Git 基本命令

git config global user.name xx git config global user.email x com 1.建立專案資料夾 mkdir myproject 2.進入專案資料夾 cd myproject 3.初始化專案 git init 4.建立 readme.md tou...

Git 基本命令

說明 以下所有操作命令 均在 git bash 下執行,即命令為linux風格 檔案 以 txt 為例 其中,建立某乙個倉庫,在某一具體路徑下 執行 git init即可 幫助命令 git help 建立 respository git init 刪除 respository rm rf git 建...