1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-29 20:55:29 +02:00
tldr/pages/common/git-rev-list.md
Managor db25f60eb1
git-*: convert options to longform and minor fixes (#13441)
Co-authored-by: spageektti <git@spageektti.cc>
Co-authored-by: Fazle Arefin <fazlearefin@users.noreply.github.com>
2024-08-31 13:06:48 +02:00

681 B

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 {{--max-count|-n}} 1 HEAD -- {{path/to/file}}

  • List commits more recent than a specific date, on a specific branch:

git rev-list --since "{{2019-12-01 00:00:00}}" {{branch_name}}

  • List all merge commits on a specific commit:

git rev-list --merges {{commit}}

  • Print the number of commits since a specific tag:

git rev-list {{tag_name}}..HEAD --count