Git log quickly and easily
Contents
These are some git log commands I use everyday and I think they are helpful for you.
1 Log all
|
|
2 Filter the commits
|
|
3 Formatting output
You can also format the log messages by using the --pretty option.
3.1 Predefing format
oneline: Displays each commit on a single line.short: Includes commit hash, author, date, and subject.medium: Adds commit message and file changes.full: Includes full commit information.format: Allows custom formatting using placeholders (e.g., %H for commit hash, %an for author name, %s for subject).
|
|
3.2 Specifiers
%HCommit hash%hAbbreviated commit hash%TTree hash%tAbbreviated tree hash%PParent hashes%pAbbreviated parent hashes%anAuthor name%aeAuthor email%adAuthor date (format respects the –date=option)%arAuthor date, relative%cnCommitter name%ceCommitter email%cdCommitter date%crCommitter date, relative%sSubject
4 Other options
--graph: Display a commit graph.--reverse: Show commits in chronological order (oldest first).--no-merges: Exclude merge commits.--oneline: Show commit in one-line
And the last thing: You can combine multiple options
K5D
