Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "git log -1" do?

Tags:

git

What does the -1 in git log -1 do?

I looked through the git log documentation but could not find any supporting documentation about this argument with git 2.16.2.

like image 743
alex Avatar asked Mar 20 '18 15:03

alex


1 Answers

This returns the most recent commit on a branch.

You won't find -1 in the documentation, but you will find "-<number>":

-<number>
-n <number>
--max-count=<number>
Limit the number of commits to output.
like image 89
alex Avatar answered Nov 14 '22 23:11

alex