Git錯誤集合_工具GIT

來源:互聯網
上載者:User
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命令。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.