提交冲突解决

Posted hongzhuang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了提交冲突解决相关的知识,希望对你有一定的参考价值。

一、将本地文件修改后push到远程分支有时会出现  devlops|MERGE

 

git add .

git commit -m "feat:优惠券功能"

git pull

........... (devlops|MEARGE)

git add .

git commit -m "feat:优惠券"

git push

 

 

二、push的时候出现rejected

$ git push -u origin branchName

To https://gitlab.hangjia.online/changqing/vue-node.git
 ! [rejected]        case -> case (non-fast-forward)
error: failed to push some refs to ‘https://gitlab.hangjia.online/changqing/vue-node.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. # 可以尝试强制push
$ git push -u origin branchName -f

  

 

以上是关于提交冲突解决的主要内容,如果未能解决你的问题,请参考以下文章

idea 提交远程库冲突解决

git 提交冲突怎么办

提交代码有冲突,解决方法

Git中使用amend解决提交冲突

idea解决代码冲突

git解决冲突,在乌龟工具中一定要点击提交