Skip to content

Instantly share code, notes, and snippets.

@jsyzdek
Last active September 9, 2023 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsyzdek/6b3ca2df355336aa4788ce53998dbb14 to your computer and use it in GitHub Desktop.
Save jsyzdek/6b3ca2df355336aa4788ce53998dbb14 to your computer and use it in GitHub Desktop.
Show recent commits in a nicely formatted way
# just do `gitl` from the command-line and you will get a nicely formatted
# commit list.
# Defaults to the most recent 15, but if you add a number you can go as far
# back as you like: `gitl 100`
function gitl () {
NUMBER="${1:-15}"
git log -n $NUMBER --pretty=format:"%C(yellow)%h %C(auto,magenta)%>(12)%ad %Cgreen%<(7)%aN%Cred%d %Creset%s"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment