log first 10 in git

后端 未结 9 1977
刺人心
刺人心 2021-01-30 12:27

Two questions:

  1. How to show the first 10 commit in git from beginning to end. (no branch)
  2. How the specify the commit index and log it. (show the second or
9条回答
  •  梦毁少年i
    2021-01-30 12:48

    git log -10
    

    Would show 10 latest commits matching the revision spec (a missing spec means "all commits").

    See manpage:

    git help log
    

    section Commit Limiting

    -, -n , --max-count=
        Limit the number of commits to output.
    

提交回复
热议问题