git-diff - git diff checks the differences between two branches and how to output the results to a specified file
黄舟
黄舟 2017-05-02 09:31:44
0
2
788
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
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
Peter_Zhu

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template