git-difftool: full file tree compare using meld?

喜你入骨 提交于 2019-12-03 15:04:32

问题


Is there an easy way to compare the file tree of an old git commit with the working file tree, in meld?

git-difftool does something very similar, but I don't want it to actually do any diffing; the whole point is that the tool it is calling can provide a better interface for that.


回答1:


I've tested this on a recent version of meld and it is now built in. You can use it with meld <directory path> so "meld ." works for the current directory. You can checkout a version git co [version] then git reset [version]^ and then run "meld ." to compare any version with it's previous version.




回答2:


With git > 1.7.11, the git difftool command now supports diffing complete directories using the --dir-diff command. This can be used together with meld:

$ git difftool --tool=meld --dir-diff [commit-to-diff-against]



回答3:


I also found this issue annoying so I've made git meld which allows a more comfortable way of diffing arbitrary commits against the working tree or the staging area. You can find it at https://github.com/wmanley/git-meld .



来源:https://stackoverflow.com/questions/2459084/git-difftool-full-file-tree-compare-using-meld

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!