Git rev-list: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Git Commands =Overview= Lists commit objects in reverse chronological order.")
 
 
(10 intermediate revisions by the same user not shown)
Line 5: Line 5:
=Overview=
=Overview=


Lists commit objects in reverse chronological order.
Lists commit objects in reverse chronological order, starting with a given commit(s). The command follows the parent links and displays the commits that are reachable - and exclude commits that are reachable from the commits that are specified with a ^ in front of them. The output is given in reverse chronological order by default. Various options and path parameters can be used to further limit the output.
 
For example:
<syntaxhighlight lang='bash'>
git rev-list commit1 commit2 ^commit3
</syntaxhighlight >
means "list all commits reachable from commit1 and commit2 but not from commit3.
 
The commits can be specified using their hash, a branch name, etc.
 
Also see:
{{Internal|git log|git log}}
 
=Commit Limiting=
{{Internal|Git Commit Limiting|Commit Limiting}}
 
=Examples=
 
<syntaxhighlight lang='bash'>
git rev-list -1 --before="@{7.days.ago}" task/feature1
</syntaxhighlight >
 
<syntaxhighlight lang='bash'>
git rev-list -10 --before="Sep 01 2020 10:46 AM PDT" develop --format=medium
</syntaxhighlight >

Latest revision as of 21:34, 1 October 2020

Internal

Overview

Lists commit objects in reverse chronological order, starting with a given commit(s). The command follows the parent links and displays the commits that are reachable - and exclude commits that are reachable from the commits that are specified with a ^ in front of them. The output is given in reverse chronological order by default. Various options and path parameters can be used to further limit the output.

For example:

git rev-list commit1 commit2 ^commit3

means "list all commits reachable from commit1 and commit2 but not from commit3.

The commits can be specified using their hash, a branch name, etc.

Also see:

git log

Commit Limiting

Commit Limiting

Examples

git rev-list -1 --before="@{7.days.ago}" task/feature1
git rev-list -10 --before="Sep 01 2020 10:46 AM PDT" develop --format=medium