1, Your Branch and ' Origin/yh_branch ' have diverged 2, NPM run-s precommit (node v8.9.3) 3, you are currently rebasing H ' 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 1 different commits each, respectively.
(use "Git pull" to merge the remote branch into yours)
Solution steps:
Reference: Https://stackoverflow.com/questions/2452226/master-branch-and-origin-master-have-diverged-how-to-undiverge-branches
1. Git merge origin/yh_branch (to merge the online branch)
2. Conflict resolution
3, submit 2, NPM run-s precommit (node v8.9.3)
Huidemacbook-pro:graph huiyu$ git commit-m "Update Code"
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)
Solve:
git commit-m "Update Code"-N 3, you are currently rebasing branch ' yh_branch ' on ' d6e7f13 '.
Problem:
Huidemacbook-pro:graph huiyu$ git status
Rebase in progress; Onto D6e7f13
You are are currently rebasing branch ' yh_branch ' on ' d6e7f13 '.
(All conflicts fixed:run "Git rebase–continue")
Nothing to commit, working
Huidemacbook-pro:graph huiyu$ git Branch
* (No branch, rebasing yh_branch)
Solve:
Use the git diff command to view conflicting files, "Resolve file conflicts yourself" or "revert in idea", and when all conflicts are resolved, use the git rebase–continue command or git rebase–skip command eventually.