git 提交时出现错误 [You have not concluded your merge (MERGE_HEAD exists).]

下午在修改BUG后 准备提交,蛋疼的事来了。

MBP:kylin Duke$ git push origin release/2016110801
To ****************.git
! [rejected] release/2016110801 -> release/2016110801 (non-fast-forward)
error: failed to push some refs to '****************.git'
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.
huangyandeMBP:kylin Duke$ git pull origin release/2016110801
error: You have not concluded your merge (MERGE_HEAD exists).
hint: Please, commit your changes before merging.
fatal: Exiting because of unfinished merge.

 

说我更新被拒绝,因为我当前的分支的前端是后面,自己分支版本低于主版本什么乱七八糟的鬼。。。。

 

然后我想pull ,接着

 

MBP:kylin Duke$ git pull origin release/2016110801
error: You have not concluded your merge (MERGE_HEAD exists).
hint: Please, commit your changes before merging.
fatal: Exiting because of unfinished merge.

还是一样的,整个人开始懵逼。。。

不行,要开大招了.............聚气中。。。。

MBP:kylin Duke$ git push -u origin release/2016110801 -f
Counting objects: 117, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (106/106), done.
Writing objects: 100% (117/117), 32.06 KiB | 0 bytes/s, done.
Total 117 (delta 79), reused 0 (delta 0)
To git@git.oschina.net:liuceng/kylin.git
+ 9077864...56eb272 release/2016110801 -> release/2016110801 (forced update)
Branch release/2016110801 set up to track remote branch release/2016110801 from origin.
MBP:kylin Duke$  

啦啦啦。。。。

*****   $ git push -u [远程分支] -f 

用了push -u之后,腿也不疼了,腰也不酸了,一口气可以上二楼了

 

总结:不让push,就强制push

 

转载于:https://www.cnblogs.com/duke-yan/p/6043625.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值