我目前在 git 中进行一个非常复杂的 merge ,我有很多冲突。冲突是关于两个 Ada 源文件。
我想进行 merge ,同时忽略空格更改和大小写更改(因为 Ada 语言不区分大小写)。 您知道是否有办法告诉 git 在 merge 之前忽略某种更改吗?
我的解决方案目前是在 merge 之前在两个分支上运行 GNAT pretty-print ,但如果 git 中包含一个通用解决方案,那将对我有很大帮助。
最佳答案
来自 release notes git 1.7.4 的:
* The "recursive" strategy also learned to ignore various whitespace changes; the most notable is -Xignore-space-at-eol.
虽然我不知道是否有忽略大小写更改的策略
关于git merge : filter files to avoid silly conflicts (like whitespace or case changes),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4861303/