Git仅在pom.xml中的版本标记上合并冲突 [英] Git merge conflict only on version tag in pom.xml

查看:944
本文介绍了Git仅在pom.xml中的版本标记上合并冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以避免在将master转换为分支时在pom.xml中的版本标记中发生合并冲突。我有很多pom文件,80,并且它们都有与master相同的版本。对于只有版本标签的80 pom文件执行git mergetool是费力和费时的。



感谢,
--Abidi

解决方案

有几个选项。没有一个是完美的: - /



1)你可以使用'git merge -s我们的',但你应该这样做,当你知道你不需要的时候其他更改也一样。

2)您也可以使用git rerere,它可以通过记住您上次执行的操作来帮助解决冲突。你可以在全局启用它的使用,所以它通过设置rerere.enabled总是正常工作。或者您也可以阅读手册页并手动完成。


Is there a way to avoid merge conflicts in version tag in pom.xml when merging master into a branch. I have quite a few pom files, 80, and all of them have same version which is different from one in master. It's laborious and time-consuming to execute git mergetool for 80 pom files just for a version tag.

Thanks, -Abidi

解决方案

You probably have a few options. None of which are perfect :-/

1) you can use 'git merge -s ours', but you should only do that when you know you don't need the rest of the changes too.

2) You can also use git rerere, which helps resolve conflicts by memorizing what you did last time. You can enable its usage globally so it always "just works" by setting rerere.enabled. Or you can read the man page and do it by hand as well.

这篇关于Git仅在pom.xml中的版本标记上合并冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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