Tim*_*gan 242
该 节目 的命令可能是你想要的东西.尝试
git show -s --format=%ci <commit>
Run Code Online (Sandbox Code Playgroud)
日期字符串的其他格式也可用.有关详细信息,请查看手册页.
小智 25
如果您只想查看标签的日期,请执行以下操作:
git show -s --format=%ci <mytagname>^{commit}
Run Code Online (Sandbox Code Playgroud)
这使: 2013-11-06 13:22:37 +0100
或者做:
git show -s --format=%ct <mytagname>^{commit}
Run Code Online (Sandbox Code Playgroud)
它给出了UNIX时间戳: 1383740557
sch*_*tbi 18
如果你想拥有没有时区的时间戳,但是当地的时区呢
git log -1 --format=%cd --date=local
Run Code Online (Sandbox Code Playgroud)
这取决于您的位置
Mon Sep 28 12:07:37 2015
Run Code Online (Sandbox Code Playgroud)
dsa*_*don 10
如果您想自己格式化日期(或小时):
git show -s --date=format:'%Y%m%d-%H%M' --format=%cd <commit id | default is the last commit>
# example output:
20210712-1948
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
82947 次 |
| 最近记录: |