git - git diff 忽略移动
问题描述
我需要区分两个删除所有空白和代码移动的提交。所以当我使用:
git diff --stat COMMIT1 COMMIT2
我得到:67 files changed, 3615 insertions(+), 5534 deletions(-)
当我使用时:
git diff --stat --ignore-space-at-eol -b -w --ignore-blank-lines COMMIT1 COMMIT2
我明白了67 files changed, 885 insertions(+), 2655 deletions(-)
。
这仍然是移动代码的原因,当我传递--color-moved
给git diff
命令时,它会正确检测移动并用不同的颜色 ( zebra
) 标记它们。
我的问题:有没有办法忽略使用的动作,git diff
以便我可以利用--stat
of git diff
?像--ignore-moved
什么?
解决方案
推荐阅读
- sql - 在括号之间的 CTE 中聚合以防万一
- arrays - 统计常见访问国家
- php - 在 php 中如何从 URL 中删除查询字符串以及访问页面的文件名?
- flutter - ListView 高度取决于内容大小
- python - 如何修复坐标加倍?
- node.js - 如何在 Node js 中加密 PDF 文件并仅使用我的 React Native 应用程序解密和查看 PDF 文件?
- apache-kafka - Spark Structured Streaming-是否可以将偏移量写入两次
- xcode - 设置按钮单击时所有 UIbuttons 的标题颜色
- amazon-web-services - 无法从在 vpc 后面的 ec2 上运行的应用程序访问 aws api 网关上的公共 api
- gdb - Stack Little endian 地址偏移量