本文介绍: 分析:这是由于你拉取pull分支前,进行过merge合并更新分支操作,而其他人在你之前已经push一个版本,导致版本不一致。根据历史版本记录选择commit地址回退自己合并之前的版本。记得养成一个良好git发布流程的习惯。第一种解决方法比较简单。再进行pull更新分支。

git:(test) git pull origin test
 * branch              test       -> FETCH_HEAD
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.

2. 解决方法

分析:这是由于你拉取pull分支前,进行过merge合并更新分支操作,而其他人在你之前已经push一个版本,导致版本不一致

第一种解决方法:比较简单

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注