Skip to content

Instantly share code, notes, and snippets.

@voyeg3r
Created July 31, 2017 17:25
Show Gist options
  • Save voyeg3r/948559b9f8700c623674de145f80a9a9 to your computer and use it in GitHub Desktop.
Save voyeg3r/948559b9f8700c623674de145f80a9a9 to your computer and use it in GitHub Desktop.
# Function to show full git log
# this function allows you to show a full
# or paged log Full git log
fgitlog (){
PRETTYFORMAT='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
if [ ! -z "$1" ] && [ "$1"=="--no-pager" ]; then
git --no-pager log --graph --pretty=format:"$PRETTYFORMAT" --abbrev-commit --date=relative
else
git log --graph --pretty=format:"$PRETTYFORMAT" --abbrev-commit --date=relative
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment