log first 10 in git log first 10 in git git git

log first 10 in git


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

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


Simply log everything with one line format and tail the output:

git log  --pretty=oneline | tail -n 10 


Here my approach,

To get first 10 commits:

git log -n 10

-n is number

AdditionalTo get next 10 commit skip first 10 :

git log --skip=10 -n 10