1、Your branch and ‘origin/yh_branch’ have diverged
2、npm run -s precommit (node v8.9.3)
3、You are currently rebasing branch ‘yh_branch’ on ‘d6e7f13’.
———————————————————————————————
1、Your branch and ‘origin/yh_branch’ have diverged
huideMacBook-Pro:graph huiyu$ git status
On branch yh_branch
Your branch and ‘origin/yh_branch’ have diverged,
and have 52 and 1 different commits each, respectively.
(use “git pull” to merge the remote branch into yours)
解决步骤:
参考:https://stackoverflow.com/questions/2452226/master-branch-and-origin-master-have-diverged-how-to-undiverge-branches
1、git merge origin/yh_branch(将线上分支merge下来)
2、解决冲突
3、提交
2、npm run -s precommit (node v8.9.3)
huideMacBook-Pro:graph huiyu$ git commit -m “更新代码”
husky > npm run -s precommit (node v8.9.3)
fatal: Not a git repository: ‘.git’
husky > pre-commit hook failed (add –no-verify to bypass)
解决:
git commit -m “更新代码” -n
3、You are currently rebasing branch ‘yh_branch’ on ‘d6e7f13’.
问题:
huideMacBook-Pro:graph huiyu$ git status
rebase in progress; onto d6e7f13
You are currently rebasing branch ‘yh_branch’ on ‘d6e7f13’.
(all conflicts fixed: run “git rebase –continue”)
nothing to commit, working tree clean
huideMacBook-Pro:graph huiyu$ git branch
* (no branch, rebasing yh_branch)
解决:
使用【 git diff 】命令,查看有冲突的文件,【自己解决文件冲突】或者【使用idea中revert】,当所有冲突解决完毕,最后使用git rebase –continue命令或者git rebase –skip命令。