git-difftool:使用 meld 比较完整的文件树?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2459084/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 04:09:45  来源:igfitidea点击:

git-difftool: full file tree compare using meld?

gitmelddifftool

提问by Andrew Wagner

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

有没有一种简单的方法来比较旧的 git commit 的文件树和工作文件树,在 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.

git-difftool 做了一些非常相似的事情,但我不希望它实际上做任何差异;重点是它正在调用的工具可以为此提供更好的界面。

采纳答案by rado

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.

我已经在最新版本的 meld 上对此进行了测试,现在已经内置了。您可以将它与 meld <directory path> 一起使用,因此“meld”。适用于当前目录。你可以签出一个版本 git co [version] 然后 git reset [version]^ 然后运行“meld”。将任何版本与其以前的版本进行比较。

回答by Stefan Seemayer

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

使用git > 1.7.11,该git difftool命令现在支持使用该--dir-diff命令比较完整的目录。这可以与meld

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

回答by Will Manley

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.

我也发现这个问题很烦人,所以我制作了 git meld,它允许一种更舒适的方式来区分对工作树或暂存区的任意提交。你可以在https://github.com/wmanley/git-meld找到它。