修改git log显示的日期和时间

 按照git log帮助显示的信息,git log可以使用的日期格式有:

          --date=(relative|local|default|iso|rfc|short|raw)
           Only takes effect for dates shown in human-readable format, such as when using "--pretty".  log.date config variable sets a
           default value for log command’s --date option.

           --date=relative shows dates relative to the current time, e.g. "2 hours ago".

           --date=local shows timestamps in user’s local timezone.

           --date=iso (or --date=iso8601) shows timestamps in ISO 8601 format.

           --date=rfc (or --date=rfc2822) shows timestamps in RFC 2822 format, often found in E-mail messages.

           --date=short shows only date but not time, in YYYY-MM-DD format.

           --date=raw shows the date in the internal raw git format %s %z format.

           --date=default shows timestamps in the original timezone (either committer’s or author’s).
 

设置git log显示日期格式的方法

git config log.date iso 
git config --global log.date iso

 

你可能感兴趣的:(git)