Git Diff输出到文件保留着色 [英] Git Diff output to file preserve coloring

查看:111
本文介绍了Git Diff输出到文件保留着色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我知道如何使用git diff> filename.rtf - 它可以保存为一个文件一个文件,但我想保留着色。

解决方案

试试:

  git diff --color> foo.txt 

然后再发行

  cat foo.txt 


Is it possible to git diff, save the output to a file with the coloring somehow?

I know how to git diff > filename.rtf - which saves to a file but I'd like to preserve the coloring.

解决方案

Try:

git diff --color > foo.txt

then later issue

cat foo.txt

这篇关于Git Diff输出到文件保留着色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆