I have configured kDiff3 with my git.
What I need is to see directory difference between two branches. when I run
git difftool <headbranch>
command it opens all files one by one. But that is not I want.
I have configured kDiff3 with my git.
What I need is to see directory difference between two branches. when I run
git difftool <headbranch>
command it opens all files one by one. But that is not I want.
git-difftool(1) now satisfies this use case. Just use the --dir-diff (or -d) switch:
-d
--dir-diff
Copy the modified files to a temporary location and perform
a directory diff on them. This mode never prompts before
launching the diff tool.
So for example:
git difftool -d --tool=kdiff3 10c25f0da62929cca0b559095a313679e4c9800e..980de1bbe1f42c327ed3c9d70ac2ff0f3c2ed4e1
See also https://www.kernel.org/pub/software/scm/git/docs/git-difftool.html
--no-symlink
option will also quiet KDiff3's "Error: Conflicting File Types" –
Thermophone Let's say, we have the two branches master and base In order to see the difference between these branches, just execute:
git difftool -d base:src/ master:src/
Then your preset diff tool should get started, in my case kdiff3.
Or you can also use the --tool
option to start another one:
e.g. with vimdiff
git difftool -d --tool=vimdiff base:src/ master:src/
or with kdiff3 the same way
git difftool -d --tool=kdiff3 base:src/ master:src/
You could use
git diff --name-status <other-branch>
It lists files with differences, with a status of A/M/D.
I haven't found possibilities to see directory difference between two branches in a directory comparison mode using kdiff3 and standard git tools.
What could be done using standard tools (fix me if I am wrong:) is file by file comparison using difftool, and overview in console using:
git diff --name-status <other-branch>
But I have found Comprehensive Graphical Git Diff Viewer Script, that did the work for me as desired - to compare the whole directory in kdiff3.
The tool is just a shell script that creates branches-to-be-compared snapshots in /tmp folder and runs kdiff3 folder comparison on them.
Checkout the script here
© 2022 - 2024 — McMap. All rights reserved.
--no-symlink
so that any changes I make in kdiff3 will apply the current checked out working directory. – Since