git基本命令

2021-09-27 08:08:06 字數 896 閱讀 6604

拉取並merge**

git pull
新增暫存區

get add .
提交到本地倉庫並加上注釋

get commit -m ''
往遠端倉庫推送**

git push origin master
檢視所有的分支

git branch -a
建立新的分支

git checkout -b aaa
切換到aaa分支

git checkout aaa
推送aaa分支到遠端倉庫aaa分支

git push origin aaa
本地新增乙個遠端倉庫

將本地的master和遠端新增的master進行連線

git push origin master:master同之前
轉殖到本地

git clone ***

(位址)

拉取遠端的檔案(另乙個人寫了傳了,你想搞下來)

git pull origin master
推送master到遠端的aaa分支

git push origin master:aaa
刪除乙個分支

git branch -d ***

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 建...