git 推送本地分支到远程分支 git push origin
生活随笔
收集整理的這篇文章主要介紹了
git 推送本地分支到远程分支 git push origin
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
** 情形:**在本地分支local_branch修改了代碼,之后要提交到遠程分支remote_branch上,使用命令git push origin remote_branch報錯。
** 報錯:**
error: src refspec remote_branch does not match any
error: failed to push some refs to ‘http://****.git’
** 解決方案:**
git push origin local_branch:remote_branch
推送本地分支local_branch到遠程分支 remote_branch并建立關聯關系
a.遠程已有remote_branch分支并且已經關聯本地分支local_branch且本地已經切換到local_branchgit pushb.遠程已有remote_branch分支但未關聯本地分支local_branch且本地已經切換到local_branchgit push -u origin/remote_branchc.遠程沒有remote_branch分支并,本地已經切換到local_branchgit push origin local_branch:remote_branch總結
以上是生活随笔為你收集整理的git 推送本地分支到远程分支 git push origin的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: es6 装饰器
- 下一篇: python中global的用法