Git error: hint: Updates were rejected because the remote contains work that you do hint: not have l_shizhenweiszw的博客-CSDN博客

baacloud免费翻墙vpn注册使用

来源: Git error: hint: Updates were rejected because the remote contains work that you do hint: not have l_shizhenweiszw的博客-CSDN博客

hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., ‘git pull …’) before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push –help’ for details.
在这里插入图片描述
解决办法:

$ git pull origin master
$ git push origin master

Please enter a commit message to explain why this merge is necessary.

请输入提交消息来解释为什么这种合并是必要的
在这里插入图片描述
git 在pull或者合并分支的时候有时会遇到这个界面。可以不管(直接下面3,4步),如果要输入解释的话就需要:

1.按键盘字母 i 进入insert模式

2.修改最上面那行黄色合并信息,可以不修改

3.按键盘左上角”Esc”

4.输入”:wq”,注意是冒号+wq,按回车键即可

赞(0) 打赏
分享到: 更多 (0)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏