如何在 Github 桌面 gui 中设置 git diff 参数

How to set git diff parameter in Github desktop gui

在最新的 github git gui 中有没有 mac 的方法 (desktop.github.com) 设置 git diff 参数?例如,我希望 git-gui 忽略 diff

中的空白更改
git diff --ignore-space-change

git-guiGitHub Desktop. git-gui comes with the Git installation (you can download the latest for OSX from git-scm.com/download/mac; the current version is 2.9.2 as of this answer date). Once installed, you can run git-gui from the command line (it installs at /usr/local/opt/git/libexec/git-core/git-gui). You can then access Preferences in Git Gui menu, and put -w (or --ignore-all-space) in Additional Diff Parameters field to ignore whitespace change, or add any other git-diff parameter 不同。

GitHub Desktop,另一方面,没有这样的选项。

2021 年 4 月更新,5 年后,GitHub 桌面版可以 actually hide whitespace(GitHub 桌面版 2.8):

Hide whitespace in diffs

Similar to being able to see more context around your changes, sometimes there are a lot of whitespace changes in a file that don’t allow you to get a clear picture of the substantive changes that happened.

Now, in both changes and history, you can optionally hide whitespace changes to allow you to focus just on the more meaningful changes to your code.

This feature was built almost entirely by Steven Yeh (@say25), a fantastic and close community contributor to GitHub Desktop. Steven is a long-time open source contributor to GitHub Desktop, and we’re immensely grateful for him continuing to help improve the product.