TOOL » GIT

Log

Usage

Show the latest commits.

shell
git log OPTIONS
OptionDescription
-nOutput only the last N commits.
-1Output only the last commit.
-LGet the logs of the given line range and file.
--onelineAbbreviate commit messages to one line.
--mergesOutput only merge commits.
--full-historyDo not prune some history.

Examples

Show full history of a line range.

shell
git log -L25,+1:'path/file.txt'

Find a commit that deleted a file.

shell
git log --full-history -1 -- path/deleted_file