hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
问题:
aaa@bbb:~/xxx/xxx/xx/xxx$ git status .
On branch cornerstone_security
Your branch and 'origin/dev' have diverged,
and have 3 and 3 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)nothing to commit, working tree clean
aaa@bbb:~/xxx/xxx/xx/xxx$ git pull
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint: git config pull.rebase false # merge (the default strategy)
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.
解决:
aaa@bbb:~/xxx/xxx/xx/xxx$ git pull --rebase origin dev
From ssh://sdv-gerrit.xxx.local:29418/xxx/xxx/xx
* branch dev -> FETCH_HEAD
Successfully rebased and updated refs/heads/xxx.
git pull --rebase origin dev
上述命令等同于:
git fetch origin
git rebase origin/dev文章来源:https://www.toymoban.com/news/detail-461090.html
引用:git Your branch and 'origin/dev' have diverged - SegmentFault 思否文章来源地址https://www.toymoban.com/news/detail-461090.html
到了这里,关于git pull 报错的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!