如何在分支之间按时间顺序 commits/merges 获取 git log --oneline --graph?
How to get git log --oneline --graph with chronological commits/merges between branches?
现在我有以下别名(在互联网某处找到):
[alias]
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
但这会在我的回购协议中产生类似的东西:
* a18c363 - (2 weeks ago) Fix | Changed sed separator - Patryk (wierd_branch)
* 7c6ddd8 - (2 weeks ago) Feature - Patryk
* 2bd909b - (2 weeks ago) Fix | This was not supposed to be there.... - Patryk
* a99f925 - (2 weeks ago) Feature | Added - Patryk
| * ed2da1d - (45 minutes ago) Feature | Added - S (origin/master, origin/HEAD)
| * d580796 - (2 hours ago) Fix | Tag - W
| * e0b1611 - (2 hours ago) Fix - S
| * 8588818 - (2 weeks ago) Documentation | Incremented documentation version - X
|/
* 05ff79b - (2 weeks ago) Fix | changed structure - M
但是如您所见,这不是按时间顺序排列的 - 也就是说,分支给出直线而不是显示提交,例如2 个分支按时间顺序发生(例如 ed2da1d
应该在日志的顶部)。
我怎样才能使它按时间顺序排列? (例如 GitLab 有某种日志显示多个分支中的按时间顺序提交,但在其网络中 UI)
接下来的行为看起来像是给出了明确的日期格式 --topo-order
。这很奇怪,但明确给出 --date-order
为我修复了它。
现在我有以下别名(在互联网某处找到):
[alias]
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
但这会在我的回购协议中产生类似的东西:
* a18c363 - (2 weeks ago) Fix | Changed sed separator - Patryk (wierd_branch)
* 7c6ddd8 - (2 weeks ago) Feature - Patryk
* 2bd909b - (2 weeks ago) Fix | This was not supposed to be there.... - Patryk
* a99f925 - (2 weeks ago) Feature | Added - Patryk
| * ed2da1d - (45 minutes ago) Feature | Added - S (origin/master, origin/HEAD)
| * d580796 - (2 hours ago) Fix | Tag - W
| * e0b1611 - (2 hours ago) Fix - S
| * 8588818 - (2 weeks ago) Documentation | Incremented documentation version - X
|/
* 05ff79b - (2 weeks ago) Fix | changed structure - M
但是如您所见,这不是按时间顺序排列的 - 也就是说,分支给出直线而不是显示提交,例如2 个分支按时间顺序发生(例如 ed2da1d
应该在日志的顶部)。
我怎样才能使它按时间顺序排列? (例如 GitLab 有某种日志显示多个分支中的按时间顺序提交,但在其网络中 UI)
接下来的行为看起来像是给出了明确的日期格式 --topo-order
。这很奇怪,但明确给出 --date-order
为我修复了它。