Is it possible to get the git difftool command to open a directory compare between the changed files and the staging/checked files?
So ideally, if 2 files have changed, they would be the only 2 shown, but within a directory compare.
I've read posts about getting git to give all file diffs in parallel, so tools like BeyondCompare has all the diffs in tabs, but im not happy with that!
One could pull a copy of the changed files from staging/checked in files into a temp folder, and then open that up. Is that the only option?
Meld lets you compare two or three folders side-by-side. You can start a new folder comparison by selecting the File ▸ New... menu item, and clicking on the Directory Comparison tab.
git difftool is a Git command that allows you to compare and edit files between revisions using common diff tools. git difftool is a frontend to git diff and accepts the same options and arguments.
Tower (Git)Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools. Open Tower's preferences dialog on the Git Config Tab. Set the Diff Tool drop-down to Beyond Compare. Set the Merge tool drop-down to Beyond Compare.
Update June 2012 (2 and an half years later):
This (comparing directories instead of file-by-file) seems to be soon available:
See [ANNOUNCE] Git 1.7.11.rc1:
"
git difftool
" learned the "--dir-diff
" option to spawn external diff tools that can compare two directory hierarchies at a time after populating two temporary directories, instead of running an instance of the external tool once per a file pair.
See "Patch difftool
: teach difftool
to handle directory diffs"
Original answer (January 2010)
One could pull a copy of the changed files from staging/checked in files into a temp folder, and then open that up. Is that the only option?
Basically yes:
You difftool script would:
You have one first example in this question.
I always use --dirstat=files
:
rudie@devver:virenze$ git diff --dirstat=files
4.1% modules/custom/virenze_conversations/
7.0% modules/custom/virenze_crs/
8.3% modules/custom/
which means I've removed dirs virenze_conversations
and virenze_crs
in custom
. (I don't know what the percentages mean...)
You can probably use all the normal diff
options: --cached
, branch name etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With