【问题标题】:Is there a way to output the result of a "git blame" to a text file?有没有办法将“git blame”的结果输出到文本文件?
【发布时间】:2013-09-23 16:24:51
【问题描述】:

我正在对一个大文件运行git blame 命令,并希望在文本文件中查看结果。

【问题讨论】:

    标签: git shell


    【解决方案1】:

    当然。在命令行只需将输出定向到您自己的文件而不是STDOUT

    git blame source_file > blame_result_file
    

    【讨论】:

    • 我只记得在你发布这个大声笑之前我可以做到这一点。无论如何,谢谢。
    【解决方案2】:

    命令行重定向适用于任何打印到标准输出的命令:

    git 责备> output.txt

    【讨论】:

    • 注意:你必须提供一个文件名:usage: git blame [options] [rev-opts] [rev] [--] file
    猜你喜欢
    • 2011-04-26
    • 2014-12-12
    • 1970-01-01
    • 1970-01-01
    • 2015-01-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-03
    相关资源
    最近更新 更多