git 新建遠端分支

2021-10-10 11:03:57 字數 510 閱讀 4035

git命令列新建分支,並推送至遠端分支(git 新建遠端分支)

1.檢視當前分支:

$ git branch

12.檢視所有分支,包含遠端分支 :

$ git branch -a

13.新建分支:

$ git checkout -b ying

14.推送本地分支到遠端分支(遠端分支與本地分支同名):

$ git push origin ying:ying

15.讓本地分支與遠端分支建立關聯:

$ git branch --set-upstream-to=origin/ying

1(注:如第五步操作未執行,拉取遠端**需執行:git pull origin ying,需標明拉取遠端的具體分支名)

6.刪除本地分支:

$ git branch -d ying

17.刪除遠端分支:

$ git push origin :ying 或 git push origin --delete ying

git 新建分支並關聯遠端分支

1 在當前分支下 一般是master分支 建立feature的本地分支分 git checkout b feature switched to a new branch feature 2 將feature分支推送到遠端 git push origin feature total 0 delta 0...

git檢視 新建 刪除遠端分支

git branch agit branchgit branch feature new 在本地倉庫新建feature new分支git push origin feature new 將feature new推到遠端倉庫git checkout feature new 切換到feature new...

Git新建分支

1.先檢視本地狀態 git status 已經是版本庫最新的 了。2.檢視本地已有分支和遠端已有分支 git branch git branch a 3.新建本地分支 git branch vso feature setmail 0523 檢視本地分支,可以看到新的分支已經建好了 4.本地分支推送到...