git - 当对 git 存储库进行本地更新时,如何显示日期?

标签 git reflog

例如:

  • 如何显示创建 HEAD@{2} 的时间?
  • 给定一个提交的 SHA1,我如何显示它被 pull 入当前 repo 的日期, 而不是(或除此之外)其提交日期?

我以为会有一个 git reflog 选项,但据我所知,没有。

最佳答案

git reflog --date=iso

将显示带日期的 reflog。

这在 manpage 中间接提及:

The subcommand "show" (which is also the default, in the absence of any subcommands) will take all the normal log options[...]

为了更好地控制 reflog 格式,您还可以使用 git log -g,它也会显示 reflog。

关于git - 当对 git 存储库进行本地更新时,如何显示日期?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19692886/

相关文章:

git - git reset --hard 后未暂存的文件消失了

git - 如何更改 .bash_history 位置(Windows 版 Git)

eclipse - Egit的Team上下文菜单只有一个选项: Apply patch

git - 为什么在稀疏 checkout 后会调用 `git read-tree`

git - 设置FORCE=yes后安装openstack时出错

git - 有没有办法让 git-reflog 在每个条目旁边显示日期?

git - 换行长 git reflog 行?

git - TortoiseGit 图标覆盖桌面上的图标

git - 如何将一组修改后的提交(存储在 reflog 中)变成真正的提交

git reflog 不显示分支更改