git difftool-如何跳过某个文件? [英] git difftool -- how to skip a certain file?
问题描述
当我执行git difftool
时,我收到消息Hit return to launch 'araxis':
.我发现可以按CTRL-C
键终止整个比较,但是如何跳过单个文件呢?
when I do a git difftool
, I get the message Hit return to launch 'araxis':
. I found out that I can terminate the whole diffing by pressing CTRL-C
, but how about skipping a single file?
这可能吗?
从 git 1.7.7.1 (和msysgit 1.7.7.1.msysgit.0)开始, 是可能的.对于每个文件,我都会被问到
as of git 1.7.7.1 (and msysgit 1.7.7.1.msysgit.0), it is possible. For every file, I get asked
Launch 'araxis' [Y/n]:
好像 peterjmag的提交中的
Seems like peterjmag's commit mentioned in his answer was accepted by the git guys and has made it's way into the master
branch!
推荐答案
根据上面评论中的要求:
As eckes requested in the comments above:
虽然它本身并不跳过"文件,但此此SO答案产生)打开每个文件在差异工具的Windows/tab中,然后您可以从此处忽略某些文件.但是,我同意应该有一个选项可以从提示中跳过某个文件,即单击返回启动'araxis'或键入's'可以跳过此文件:"
While it doesn't "skip" files per se, this git-diffall script (spawned by this SO answer) opens each file in windows/tabs in your diff tool, and then you can ignore certain files from there. However, I agree that there should be an option to skip a certain file from the prompt, i.e. "Hit return to launch 'araxis' or type 's' to skip this file: "
编辑:由于该功能对我也有帮助,因此我在github上创建了git.git并自己添加了它.请查看提交(非常简单)作为概念证明.我还将向git邮件列表提交补丁,希望有人可以提出更好的方法,最好是比我更擅长Shell脚本的人. :-)
EDIT: Since this functionality would be helpful to me as well, I forked git.git on github and added it myself. Check out this (very simple) commit for a proof of concept. I'll be submitting a patch to the git mailing list as well, in hopes that someone can suggest a better approach--preferably someone who's better at shell scripting than me. :-)
我也很乐意通过GitHub的内置注释系统获得反馈!
I'm also open to feedback via GitHub's built-in notes system!
另一项编辑:截至v1.7.7.1左右(2011年10月),此功能现在已在git core中. 这是在GitHub上的相关提交.
ANOTHER EDIT: It appears that this functionality is now in git core as of v1.7.7.1 or so (October 2011). Here's the relevant commit on GitHub.
这篇关于git difftool-如何跳过某个文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!