标签:
场景: 同事发了一个版(我需要其中部分代码),提交合并到主分支,然后我的分支也提交到主分支,然后再将主分支上的代码合并到我的分支(gitlab上进行的合并操作)。然后再在本地开发环境中的foo分支下执行pull操作,出现丢失跟踪信息的错误,导致无法更新gitlab对master合并到foo 的操作。(我承认,这个很绕=.=#,或许这是一个搓办法,希望大大给个好方法)
还好git给了个提示:If you wish to set tracking information for this branch you can do so with
> git pull
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> foo
看到了,给了个提示:
> 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.
到此,问题解决
gitlab创建merge请求:从master合并到foo分支后的问题
标签:
原文地址:http://my.oschina.net/lxrm/blog/404472