I've made a simple regex find & replace in my project which affected ~300 files, mostly in 2-5 lines per file. In addition there were some minor tweaks and manual changes to fix irregular case.
Now I want to see all diff and compare each change using some compare tool (preferably beyond compare 4).
The best I came up with was to use git diff > changes.diff
but this is still a single document and I prefer to see it side by side.
Is there a way to view all diffs in a single compare window?
P.S I could probably parse the diff file and take the +
lines to one file and -
lines to another, but hopefully there's something automatic for me to use.
EDIT:
I'm not looking for a way to compare diff using a tool like Beyond Compare. I want to view all changes from multiple file at once as side by side comparison. I don't want to go over the 300+ files one by one and compare using BC, instead I want to open a single file which contains all changes and compare it to the same file without the changes.
For example, if I have 2 files test1.cpp
and test2.cpp
and I do git diff
I'll get:
diff --git.....
--- a/file1.cpp
+++ b/file1.cpp
@@ ....
- foo("a", "b");
+ bar("a", "b");
--- a/file2.cpp
+++ b/file2.cpp
@@ ....
- foo("x", "y");
+ bar("x", "y");
I want to be able to open BC and see something like (in a single tab/window):
--- a/file1.cpp | +++ b/file1.cpp
foo("a", "b"); | bar("a", "b");
|
--- a/file2.cpp | +++ b/file2.cpp
foo("x", "y"); | bar("x", "y");
To output all file differences to a single file using Beyond Compare:
To cycle through differences one file at a time: