gitlab建立merge請求:從master合併到foo分支後的問題

場景: 同事發了一個版(我須要其中部分代碼),提交合併到主分支,而後個人分支也提交到主分支,而後再將主分支上的代碼合併到個人分支(gitlab上進行的合併操做)。而後再在本地開發環境中的foo分支下執行pull操做,出現丟失跟蹤信息的錯誤,致使沒法更新gitlab對master合併到foo 的操做。(我認可,這個很繞=.=#,或許這是一個搓辦法,但願大大給個好方法)git

還好git給了個提示:If you wish to set tracking information for this branch you can do so withgitlab


> git pullthis

There is no tracking information for the current branch.spa

Please specify which branch you want to merge with.orm

See git-pull(1) for detailsci


    git pull <remote> <branch>開發


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


    git branch --set-upstream-to=origin/<branch> fooit



看到了,給了個提示:io


> git branch --set-upstream-to=origin/foo foo

Branch front set up to track remote branch front from origin.

> git pull

Already up-to-date.

到此,問題解決

相關文章
相關標籤/搜索