Git Config Cookbook/Create last commit alias

Review most recent commit quickly.

Section: Useful Aliases

Create last commit alias

bash
bash
git config --global alias.last 'log -1 HEAD --stat'

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Useful Aliases
Create graph log alias
Quick visual history alias.
OpenIn sheetbashsame section
Create unstage alias
Shortcut to unstage files.
OpenIn sheetbashsame section
Create branches alias
Verbose local branch listing.
OpenIn sheetbashsame section
Set repo-specific user name
Override global identity in one repository.
OpenIn sheetbash1 tag match
Require fast-forward pulls
Fail pull if it would create a merge commit.
OpenIn sheetbash1 tag match
Use VS Code merge tool
Set preferred merge tool name.
OpenIn sheetbash1 tag match