How do I git log with short commit hash + date/time?

后端 未结 1 1316
感情败类
感情败类 2021-01-06 15:06

Let\'s say I do this command: git log -4 --pretty=format:%h

How do I add date/time to each result?

相关标签:
1条回答
  • 2021-01-06 15:51

    For Committer Date use %cd:

    git log -4 --pretty=format:"%h - %cd"
    

    -

    For Author Date use %ad:

    git log -4 --pretty=format:"%h - %ad"
    

    -

    For more options refer this.

    0 讨论(0)
提交回复
热议问题