前言
之前項(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/隔離版本
終于成功