git本地分支與遠(yuǎn)程分支關(guān)聯(lián)問題

前言

之前項(xiàng)目中遇到將本地分支推送到遠(yuǎn)程倉(cāng)庫(kù)并創(chuàng)建新的遠(yuǎn)程分支問題Android--Git常用操作

問題

遇到一個(gè)新問題,將本地倉(cāng)庫(kù)與遠(yuǎn)端倉(cāng)庫(kù)已存在某分支關(guān)聯(lián)起來,嘗試使用
git pull,報(bào)錯(cuò),提示

There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> 隔離版本

按照提示操作:git branch --set-upstream 隔離版本 origin/隔離版本
出現(xiàn)新問題:

The --set-upstream flag is deprecated and will be removed. Consider using --track or --set-upstream-to
Branch 隔離版本 set up to track remote branch 隔離版本 from origin.```
繼續(xù)操作:```git branch --set-upstream-to  origin/隔離版本

終于成功

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容