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.

到此,问题解决

相关文章
相关标签/搜索