Git error Collection _ Tool git

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.