git rev-list
List revisions (commits) in reverse chronological order. More information: https://git-scm.com/docs/git-rev-list.
- List all commits on the current branch:
git rev-list HEAD
- Print the latest commit that changed (add/edit/remove) a specific file on the current branch:
git rev-list 1 HEAD --
- List commits more recent than a specific date, on a specific branch:
git rev-list --since ""
- List all merge commits on a specific commit:
git rev-list --merges
- Print the number of commits since a specific tag:
git rev-list ..HEAD --count
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
