mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-03 07:55:02 +00:00
Move pages under tldr, lint run.sh, update docs
This commit is contained in:
29
tldr/git-rev-list
Normal file
29
tldr/git-rev-list
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# 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 -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`
|
||||
Reference in New Issue
Block a user