Yet I suppose almost every Git user knows it already, I’d like to write down a simple way to show logs in git using –pretty and –graph. Just add it to your globals.
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
Then, each time you write “git lg” it will show something like this:

I apologize for using a spanish written example, but it was the simpliest available