git merge:过滤文件以避免愚蠢的冲突(例如空格或大小写更改) [英] git merge: filter files to avoid silly conflicts (like whitespace or case changes)

查看:376
本文介绍了git merge:过滤文件以避免愚蠢的冲突(例如空格或大小写更改)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前在git中非常复杂的合并中,并且有很多冲突.冲突是关于两个Ada源文件.

I'm currently inside a very complicated merge in git, and I have many conflicts. The conflict is about two Ada source files.

我想进行合并,同时忽略空格更改和大小写更改(因为Ada语言不区分大小写). 您知道是否有一种方法可以告诉git在合并之前忽略某些更改吗?

I would like to make a merge that would ignore both whitespace changes and case changes (as the Ada language is case insensitive). Do you know if there is a way to tell git to ignore some kind of changes before a merge ?

我的解决方案当前是在合并之前在两个分支上运行GNAT漂亮打印,但是如果git中包含一个通用解决方案,那将对我有很大帮助.

My solution is currently to run the GNAT pretty print on both branches before the merge, but if there was a common solution included in git, that would help me a lot.

推荐答案

. txt"rel =" nofollow>发行说明 git 1.7.4:

from the release notes of git 1.7.4:

*递归"策略还学会了忽略各种空白 变化;最值得注意的是-Xignore-space-at-eol.

* The "recursive" strategy also learned to ignore various whitespace changes; the most notable is -Xignore-space-at-eol.

我不知道是否有忽略案例更改的策略

I don't know if there is a strategy to ignore case changes though

这篇关于git merge:过滤文件以避免愚蠢的冲突(例如空格或大小写更改)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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