Gitk:设置“忽略空间更改”选项默认为 true
这有可能吗?我尝试过 git config --global alias.diff 'diff -b -w' 但不幸的是这不是解决方案。
Is this possible in any way? I have tried git config --global alias.diff 'diff -b -w'
but unfortunately that was not the solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
它有点老了,但我前几天在谷歌上发现了这个问题,已经接受的答案给了我一个如何做的提示。
无需修改 gitk 本身:只需编辑 .gitk 文件(~/.config/git/gitk 或 ~/.gitk)并添加:
It's a bit old but I found that question the other day googling, and the already accepted answer gave me a hint of how to do it.
No need to modify gitk itself: just edit your .gitk file (~/.config/git/gitk or ~/.gitk) and add:
这里真正需要的只是保留 UI 上的复选按钮设置的变量值。以下补丁实现了这一点。或者您可以在第 11475 行强制默认值为 true(
setignorespace 1
)。All that is really required here is to persist the value of the variable set by the checkbutton on the UI. The following patch achieves this. Or you could just force the default to be true at line 11475 (
set ignorespace 1
).注意:现在(2014 年 9 月之后)更新 gitk
config_variables
并添加ignorespace
https://github.com/git/git/commit/9fabefb1f3f658e77eb18afa3f95efe1a0ee8d0d
所有这些都刷新到
.gitk
文件。Note: Now (after Sept 2014) update gitk
config_variables
and addignorespace
https://github.com/git/git/commit/9fabefb1f3f658e77eb18afa3f95efe1a0ee8d0d
All these are flushed to
.gitk
file.