2019-12-17 20:31:17 +00:00
|
|
|
# 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}}`
|
|
|
|
|
2022-02-24 12:38:17 +00:00
|
|
|
- Print the latest commit that changed (add/edit/remove) a specific file on the current branch:
|
|
|
|
|
2024-09-03 01:43:42 +01:00
|
|
|
`git rev-list {{-n|--max-count}} 1 HEAD -- {{path/to/file}}`
|
2022-02-24 12:38:17 +00:00
|
|
|
|
2019-12-17 20:31:17 +00:00
|
|
|
- List commits more recent than a specific date, on a specific branch:
|
|
|
|
|
2024-08-31 12:06:48 +01:00
|
|
|
`git rev-list --since "{{2019-12-01 00:00:00}}" {{branch_name}}`
|
2019-12-17 20:31:17 +00:00
|
|
|
|
|
|
|
- List all merge commits on a specific commit:
|
|
|
|
|
|
|
|
`git rev-list --merges {{commit}}`
|
2021-09-03 20:12:35 +01:00
|
|
|
|
|
|
|
- Print the number of commits since a specific tag:
|
|
|
|
|
|
|
|
`git rev-list {{tag_name}}..HEAD --count`
|