如何全局、每次、一劳永逸地告诉 git --ignore-space-at-eol?
How to tell git --ignore-space-at-eol globally, everytime, once for all?
我厌倦了不时将core.autocrlf
更改为true
、input
和false
以使git diff
忽略CRLF
和 LF
的区别。此时 git diff
甚至不会在 diff 输出中显示 ^M
字符,但仍然表现为文件完全相同但完全不同。
我遇到了 git diff --ignore-space-at-eol
开关,它解决了我的问题。但是,我无法全局配置此行为。
如何告诉 git diff
默认使用 --ignore-space-at-eol
开关?
How can I tell git diff to use --ignore-space-at-eol switch by default?
你不能。
您 可以 ,但是,设置一个 别名 或者,或者编写您自己的命令,调用 git diff
和添加标志。这可能就是去这里的方式。参见,例如,How do I alias commands in git?
我厌倦了不时将core.autocrlf
更改为true
、input
和false
以使git diff
忽略CRLF
和 LF
的区别。此时 git diff
甚至不会在 diff 输出中显示 ^M
字符,但仍然表现为文件完全相同但完全不同。
我遇到了 git diff --ignore-space-at-eol
开关,它解决了我的问题。但是,我无法全局配置此行为。
如何告诉 git diff
默认使用 --ignore-space-at-eol
开关?
How can I tell git diff to use --ignore-space-at-eol switch by default?
你不能。
您 可以 ,但是,设置一个 别名 或者,或者编写您自己的命令,调用 git diff
和添加标志。这可能就是去这里的方式。参见,例如,How do I alias commands in git?