猿问

git (master|MERGING)

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

https://img.mukewang.com/5c79d4b10001224c08000358.jpg

hint: Updates were rejected because the tip of your current branch is behindhint: 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又出现问题同样的问题,记得以前结果一次,就是回退,好像就好了,现在不行了

哪位大神路过,解释下


holdtom
浏览 6013回答 2
2回答

子衿沉夜

当前分支落后,先git pull拉取最新代码,可能存在冲突,解决冲突后,在git add,git commit,git push,提交之后才能切换到别的分支。 这里有两个冲突,到具体的文件中去把冲突解决掉,再执行

繁星coding

git add -Agit commit -m '描述'git push
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答