我可以让 Git 'difftool' 默认应用 '--dir-diff' 吗?
Can I have my Git 'difftool' apply '--dir-diff' by default?
有没有办法配置 Git 在执行
时始终应用 --dir-diff
选项
git difftool <commit> <commit>
例如,逻辑上等同于:
[diff]
#tool = p4merge
tool = araxis
[difftool]
prompt = false
dirdiff = true # Is there something equivalent to this?
[mergetool "araxis"]
path = /Applications/Araxis Merge.app/Contents/Utilities/compare
不是本地的,但你可以创建一个 shell 别名(取决于你 OS 是什么 运行)来为你做这件事,所以你可以分配例如gd
作为 git difftool --dir-diff
创建一个 git 别名:git config --global alias.gd 'difftool --dir-diff'
现在 git gd
将 运行 您想要的命令,字符更少。
有没有办法配置 Git 在执行
时始终应用--dir-diff
选项
git difftool <commit> <commit>
例如,逻辑上等同于:
[diff]
#tool = p4merge
tool = araxis
[difftool]
prompt = false
dirdiff = true # Is there something equivalent to this?
[mergetool "araxis"]
path = /Applications/Araxis Merge.app/Contents/Utilities/compare
不是本地的,但你可以创建一个 shell 别名(取决于你 OS 是什么 运行)来为你做这件事,所以你可以分配例如gd
作为 git difftool --dir-diff
创建一个 git 别名:git config --global alias.gd 'difftool --dir-diff'
现在 git gd
将 运行 您想要的命令,字符更少。