问题描述
git diff [branchA] [branchB]
用以上这个命令可输出两个分支的区别,但是不同的文件太多,在命令行查看不是很方便,想输出到文件中查看,不知道如何加参数?
===================================补充:找到答案:
// >> 后加输出文件的路径、文件名和后缀名 git diff [branchA] [branchB] >>d:/diff/exportname.diff
问题解答
回答1:linux的重定向命令覆盖 git diff [branchA] [branchB] > a.txt追加 git diff [branchA] [branchB] >> a.txt
回答2:git diff --color > foo.diff
foo.diff用notepad++/sublime 之类的编辑器打开,高亮颜色