git merge : filter files to avoid silly conflicts (like whitespace or case changes)

标签 git merge whitespace case-insensitive conflict

我目前在 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/

相关文章:

java - ffmpeg 出现空格错误

git - 克隆分支并将其推送到私有(private)仓库中

Git 产生 "BUG: There are unmerged index entries"

php - 如何修复从 HTML 中提取的纯文本的句子间距?

windows - 将子文件夹中的 .js 文件合并为一个合并文件的批处理文件

python - 2 个数据框,相同的列数,不同的行数比较和替换值

html - 换行时父 div 比其子文本宽

ios - 如何在一个 git repo 中拥有多个 pod

git - 来自 git 状态的 "fatal: Not a git repository (or any of the parent directories)"

git - 让 Git 在 Visual Studio 中忽略 WebDeploy 的 PublishProfile