北京小辉的博客

学习是一种享受,也是一种痛苦,更是一种回忆!!!

Git错误集合

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命令。

阅读更多
版权声明:本文为博主原创文章,出处为 http://blog.csdn.net/silentwolfyh https://blog.csdn.net/silentwolfyh/article/details/79068114
个人分类: 【工具】GIT
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

Git错误集合

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭