日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 >

git 推送本地分支到远程分支 git push origin

發(fā)布時(shí)間:2025/3/21 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 git 推送本地分支到远程分支 git push origin 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

** 情形:**在本地分支local_branch修改了代碼,之后要提交到遠(yuǎn)程分支remote_branch上,使用命令git push origin remote_branch報(bào)錯(cuò)。

** 報(bào)錯(cuò):**
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到遠(yuǎn)程分支 remote_branch并建立關(guān)聯(lián)關(guān)系

a.遠(yuǎn)程已有remote_branch分支并且已經(jīng)關(guān)聯(lián)本地分支local_branch且本地已經(jīng)切換到local_branchgit pushb.遠(yuǎn)程已有remote_branch分支但未關(guān)聯(lián)本地分支local_branch且本地已經(jīng)切換到local_branchgit push -u origin/remote_branchc.遠(yuǎn)程沒有remote_branch分支并,本地已經(jīng)切換到local_branchgit push origin local_branch:remote_branch

總結(jié)

以上是生活随笔為你收集整理的git 推送本地分支到远程分支 git push origin的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。