git log -1 <commit> Limit scope to a particular commit.

git log -1 HEAD Show last commit on the current branch.

git log —abbrev-commit Show only the first few characters of the SHA-1 checksum instead of all 40.

git log —all-match Return log entries that match all of the conditions specified.

git log <commit>..HEAD List all commits starting with and after <commit>.

git log —decorate Decorate with ref names.

git log —graph Show commit graph.

git log —grep <string> Look for commits with a certain phrase in the commit message.

git log -<n> Show only <n> most recent commits.

git log —name-only Show recent commits with the file names.

git log —name-only -1 <commit> List the files altered by the particular commit.

git log -p definition: 'Show the actual changes made.'

git log -p -1 <commit> Show the change made by a particular commit.

git log —pretty=format:"%h %an %ad %N" <filename> Format the data line as follows: Abbreviated commit hash, author name, commit date, commit notes.

git log —pretty=oneline definition: 'Print each commit on a single line.'
ety: ''
variants: ''

git log —pretty=oneline | grep <string> Find commit(s) with comments containing <string>.

git log —reverse definition: 'Reverse order of results.'

git log -s definition: 'Suppress diff output.'
ety: ''
variants: ''

git log —stat definition: 'Show abbreviated stats for each commit.'
ety: ''
variants: ''

Facts, Thoughts and Opinions

git lol

Provides a really nice graph of your tree, showing the branch structure of merges.

git log --graph --decorate --pretty=oneline --abbrev-commit


  •   Subtopics

  •   Writings

  Sources & Bookmarks

Name/Link Date
git log Pending