向Git添加提示以协助差异

问题描述 投票:1回答:1

Git diff经常认为微小的变化是非常大的变化,并且没有正确识别次要变更的代码。

是否有一种简单的方法可以通过添加源代码中的某个标记来帮助git,或者可能采用其他方式?

git git-diff
1个回答
3
投票

git diff提供各种方法来忽略微小的变化:

然而,这是局部差异。 对于GitHub,没有本机解决方案强制它在文件“太大”时显示差异。

类似的情况(仍然在GitHub上)是reported here,当看到

Sorry, we could not display the entire diff because too many files changed

我正在通过将diff文件下载到本地来解决方法,但是通过这种方式我没有像GitHub PR中那样的diff突出显示功能。

Adding .patch at the end of the diff GitHub URL can help a bit

© www.soinside.com 2019 - 2024. All rights reserved.