git
› Pro Git
› Atlassian Git Tutorial
› Pro Git 简体中文翻译
› GitX
iugo
V2EX  ›  git

如何将 git log 命令输出的内容自动导出到一个文件中?

  •  
  •   iugo · May 6, 2016 · 9189 views
    This topic created in 3854 days ago, the information mentioned may be changed or developed.

    有没有类似这样的功能:

    git log --save="log.txt"
    

    save 这个参数是我设想的, 可以自动在当前目录下创建一个名为 log.txt 的文件, 并且把 git log 输出的内容导出到该文件中.

    8 replies  •  2016-05-06 14:15:49 +08:00
    theblackswan
    theblackswan
    May 6, 2016❤️1
    1
    用 pipe
    elrrrrrrr
    elrrrrrrr
    May 6, 2016❤️1
    2
    ```
    git log > log.txt
    ```
    donieleigh
    donieleigh
    May 6, 2016
    3
    pipe +1
    Pastsong
    Pastsong
    May 6, 2016❤️1
    4
    git log > log.txt
    qqmishi
    qqmishi
    May 6, 2016
    5
    重定向即可
    bp0
    bp0
    May 6, 2016
    6
    git log > log.txt 2>&1

    话说, git log 会输出 stderr 吗?会吗?会吗?
    mashpolo
    mashpolo
    May 6, 2016
    7
    @bp0 你把.git 目录删掉,就有 error 了。。
    yggd
    yggd
    May 6, 2016
    8
    git log > xxx
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3911 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 05:41 · PVG 13:41 · LAX 21:41 · JFK 00:41
    ♥ Do have faith in what you're doing.