Skip to content

Instantly share code, notes, and snippets.

@cworks
Created December 22, 2015 04:32
Show Gist options
  • Save cworks/fc87863f0bef964edce0 to your computer and use it in GitHub Desktop.
Save cworks/fc87863f0bef964edce0 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Example output:
# badb24d | Fri Mar 20 14:27:51 2015 | [cworks] | little clean up
numLines="20"
if [[ $1 =~ '^[0-9]+$' ]] ; then
$numLines = $1
fi
git --no-pager log -n $numLines --pretty=format:'%h | %ad | [%an] | %s%d' --date=local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment