git diff [branchA] [branchB]
Using the above command can output the difference between the two branches, but there are too many different files, and it is not very convenient to view it on the command line. I want to output it to a file for viewing, but I don’t know how to add parameters?
====================================
Additional: Found the answer:
// >> 后加输出文件的路径、文件名和后缀名
git diff [branchA] [branchB] >>d:/diff/exportname.diff
Linux redirection command
override git diff [branchA] [branchB] > a.txt
append git diff [branchA] [branchB] >> a.txt
git diff --color > foo.diff
foo.diff is opened with an editor like notepad++/sublime and the color is highlighted