为了账号安全,请及时绑定邮箱和手机立即绑定

git (master|MERGING)

git (master|MERGING)

holdtom 2019-03-02 08:55:35
最近同事合代码出现问题,不知道怎么解决了,以前遇到一次,代码回退后,再合并依旧出现这个问题,求大佬帮助问题描述: git pull之后出现(master|MERGING)切报异常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又出现问题同样的问题,记得以前结果一次,就是回退,好像就好了,现在不行了哪位大神路过,解释下
查看完整描述

2 回答

?
子衿沉夜

TA贡献1828条经验 获得超3个赞

当前分支落后,先git pull拉取最新代码,可能存在冲突,解决冲突后,在git add,git commit,git push,提交之后才能切换到别的分支。 
https://img1.sycdn.imooc.com//5c79d4c80001046707150067.jpg

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

查看完整回答
反对 回复 2019-03-02
?
繁星coding

TA贡献1797条经验 获得超4个赞

git add -A

git commit -m '描述'

git push


查看完整回答
反对 回复 2019-03-02
  • 2 回答
  • 0 关注
  • 6012 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号