git报错Please enter a commit message to explain why this merge is necessary

问题:

多人联合开发时,经常在你git pull和git push之间有其他人push了新代码,不可避免的会遇到如下问题。

Merge branch 'main' of https://gitlab.rd.test.com/iOS/SideB/TestDemo
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
~                                                                                    
~                                                                                                                                                               
"~/Documents/TestDemo/.git/MERGE_MSG" 6L, 313B

解决:

按“ESC”键后输入“:wq”后回车解决

:wq 强制性写入文件并退出(存盘并退出 write and quite)

TO:

【Linux】vi编辑器中:wq 、:wq!、:x、:q、:q!的详细区别

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值