Is there a way to show index numbers of commit in

    git log

command, git log only show me SHA1 check sum. Thanks

没有正确的解决方案

其他提示

Git commits do not have an index number. A git repository is a tree of commits, it is not a list.

git log can order commits in the following ways:

Commit Ordering
   By default, the commits are shown in reverse chronological order.

   --topo-order
       This option makes them appear in topological order (i.e. descendant commits are shown before their parents).

   --date-order
       This option is similar to --topo-order in the sense that no parent comes before all of its children, but otherwise things are still ordered in the commit timestamp order.

   --reverse
       Output the commits in reverse order. Cannot be combined with --walk-reflogs.

If git log would show you an index number it would change each time you show the commits in a different order (and if you merged in another branch).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top