解决合并时的冲突(已删除和已修改) [英] Solving conflicts on merge (Deleted and Modified)

查看:155
本文介绍了解决合并时的冲突(已删除和已修改)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图解决合并冲突。我必须分支 Master Develop 。在开发过程中,我们做了一些改变,过了一段时间后我们合并成了Master。



前一段时间,我们不得不对 Master

当然,现在当我们尝试合并Master< -Develop时,在修改的两个文件中存在冲突在硕士。



所以,我首先尝试了合并:


你可以看到有冲突,所以我尝试了一个git状态,然后一个git diff:





我想解决接受Master的变更的问题。

解决方案


我想解决接受Master中所做更改的问题。


文件,使用 git checkout

  git checkout --ours  -  modukle / Webapp / sec / Webapp / Controller / VoucherController.php 
code>

关于我们删除,如果您想保留删除,只需 git add -u 。



A git status 不应该再显示出冲突。

A git commit 来完成合并。


Im trying to fix a conflict on a merge. I have to branches Master and Develop. On Develop we made the changes that after a while we merge into Master.

A while ago we had to push some modifications to Master since from there our server takes the code to deploy.

Of course now when we try merge Master<-Develop there is a conflict in the two files modified in Master.

So, first I tried the merge:

As you can see there is the conflict, so I tried a git status and then a git diff:

I will like to fix the problem accepting the changes made in Master.

解决方案

I will like to fix the problem accepting the changes made in Master.

For a specific file, using git checkout:

git checkout --ours -- modukle/Webapp/sec/Webapp/Controller/VoucherController.php

Regarding the "deleted by us", if you want to keep that deletion, simply git add -u ..

A git status shouldn't show you anymore conflict.

A git commit is needed to complete the merge.

这篇关于解决合并时的冲突(已删除和已修改)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆