git - 如何生成忽略空格的 2 个提交之间的差异

标签 git version-control diff

在我的 git 日志中,我有 2 次提交。如何在它们之间产生差异 - 忽略空格?

$ git log
commit e5640171f391fdf479fa14fab0da6628efed1fa6
Author: test <test@mycompany.com>
Date:   Mon Jul 13 11:41:02 2009 -0700

    Fix Bug 1.

commit 0984e27b75f480da8b8c4ce2399bf877c557a78d
Author: test <test@mycompany.com>
Date:   Tue Jul 7 14:50:26 2009 -0700

    Fix Bug 2.

最佳答案

git diff --ignore-all-space 0984 e564

-w 是 --ignore-all-space 的简写

更重要的是知道我是怎么发现的:

git help diff

这让我可以看到带有解释的各种选项。

关于git - 如何生成忽略空格的 2 个提交之间的差异,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1122064/

相关文章:

php - 您是否必须在本地主机和生产环境中运行 Composer?

git - 删除所有内容并上传新版本

performance - 乌龟 Mercurial 慢

java - 抽象算法 : String/Byte Comparison/Diff

git - git暂存区是如何存储文件的?

git - 如何使用命令行删除我在 Git 上的存储库?

linux - 比较大文件

.net - 识别 2 个 HTML 页面是否相似

git - 将 Jenkins 与私有(private) BitBucket Git 存储库一起使用

git - 如何预览 git-pull?