git difftool -- how to skip a certain file?
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?
Is this possible?
Edit: 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]:
Seems like peter开发者_StackOverflowjmag'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:
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: "
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. :-)
I'm also open to feedback via GitHub's built-in notes system!
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.
精彩评论