相关疑难解决方法(0)

git log 格式的可选缩进换行符

我一直在修改git某些log命令的别名。我有我想要的大部分东西(信用在这里),但是我在一件事情上遇到了麻烦。当我打电话

git log --graph --format=format:'%h - [%ar] %s%+d'
Run Code Online (Sandbox Code Playgroud)

我得到

* ab123f - [6 hours ago] Fix the references
|  (HEAD, origin/master, master)
* bc123f - [8 hours ago] New build syntax
* cd123f - [10 hours ago] Initial import
Run Code Online (Sandbox Code Playgroud)

Where%+d添加一个新行并--decorate在其上放置标签(如果存在)。我想要的是标签与时间戳一致,如下所示:

* ab123f - [6 hours ago] Fix the references
|          (HEAD, origin/master, master)
* bc123f - [8 hours ago] New build syntax
* cd123f - [10 hours ago] Initial import …
Run Code Online (Sandbox Code Playgroud)

git formatting git-log

4
推荐指数
1
解决办法
2163
查看次数

标签 统计

formatting ×1

git ×1

git-log ×1