What does the -n command in git mean

Asked

Viewed 197 times

2

They gave me a command to see the last commit of a file that was deleted, I know what it means all subcommands but I don’t know what the command means -n, see the example of the command below:

log --diff-filter=D --name-status -n 1 -- lib/docs/index.html

1 answer

4


The subcommand -n in the git log is the reduced form for number and will display the output with a defined number of commits given after the -n

Source: https://git-scm.com/docs/git-log

  • I swear I looked before in this documentation and I couldn’t find the definition, now that you explained and passed the link I went there and found... Thank you very much, that’s correct !

  • It happens hehehe.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.