简体   繁体   English

Git 仅按提交顺序记录当前分支消息

[英]Git log current branch messages only in order of commits

找到一种方法只获取 git 提交消息,但只从当前分支获取,并且按照提交的顺序。

有一种方法,例如:如果您的分支是来自 develop 分支的分支,您可以运行:

git log --no-merges --count HEAD ^develop --reverse --pretty=oneline --abbrev-commit
git log --first-parent your_branch_name --reverse

where --first-parent - will show the commit messages but only from the your_branch_name branch其中--first-parent - 将显示提交消息,但仅来自your_branch_name分支
, --reverse - use a messages order which will display the commits from oldest on top to the most recent at the bottom. , --reverse - 使用消息顺序,它将从最旧的顶部到最新的底部显示提交。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM