Git Directory Diff does not work in my submodule

拜拜、爱过 提交于 2019-12-05 11:57:08

This workaround works for me:

GIT_WORK_TREE="$(git rev-parse --show-toplevel)" GIT_DIR="$(git rev-parse --git-dir)" git difftool --tool=meld --dir-diff

You can of course put in --cached as per your example.

That's quite a lot to type so you can add the following alias to your ~/.gitconfig:

[alias]
    submeld = !git --work-tree "$(git rev-parse --show-toplevel)" --git-dir "$(git rev-parse --git-dir)" difftool --tool=meld --dir-diff
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!