Git使用總結

2021-08-03 11:02:34 字數 455 閱讀 4372

怎麼推送本地分支到遠端分支上去。

答:命令:git push origin local_branch:remote_branch。 例如:本地為develop分支,遠端為dev分支,則是 git push origin develop:dev。 類似,git push origin :remote_branch,local_branch留空的話則是刪除遠端remote_branch分支。 如:git push origin :dev,則是刪除遠端dev分支。

檢出倉庫**

配置git,不用每次都輸入使用者名稱和密碼 在git的命令列下輸入以下**:git config --global credential.helper store在下次提交時輸入使用者名稱和密碼,此使用者名稱和密碼將會被記住並儲存起來。再以後push或pull時就不用輸密碼來了。

撤銷操作

首次提交新增遠端**庫位址

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

Git使用總結

在windows上安裝git 安裝完成後,在開始選單裡找到 git git bash 蹦出乙個類似命令列視窗的東西,就說明git安裝成功!install git on windows安裝完成後,還需要最後一步設定,在命令列輸入 git config global user.name your nam...