git (master|MERGING)

最近同事合代码出现问题,不知道怎么解决了,以前遇到一次,代码回退后,再合并依旧出现这个问题,求大佬帮助
问题描述: git pull之后出现(master|MERGING)
clipboard.png
切报异常

clipboard.png

hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details

failed to push some refs to 'http://***********.git'

然后 git reset -hard head之后再git pull又出现问题同样的问题,记得以前结果一次,就是回退,好像就好了,现在不行了

哪位大神路过,解释下

阅读 3.3k
1 个回答

当前分支落后,先git pull拉取最新代码,可能存在冲突,解决冲突后,在git add,git commit,git push,提交之后才能切换到别的分支。
图片描述

这里有两个冲突,到具体的文件中去把冲突解决掉,再执行
git add -A

git commit -m '描述'

git push

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题