如何使用短提交散列+日期/时间来登录日志? [英] How do I git log with short commit hash + date/time?

查看:149
本文介绍了如何使用短提交散列+日期/时间来登录日志?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我执行以下命令:
git log -4 --pretty = format:%h



如何为每个日期/时间添加日期/时间结果?

使用%cd 提交日期 >:

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

-



对于作者日期 code>%ad :

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



< - > -



有关更多选项,请参阅

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

How do I add date/time to each result?

解决方案

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.

这篇关于如何使用短提交散列+日期/时间来登录日志?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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