git config --global alias.hist "log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short"
git config --global alias.lol "log --graph --decorate --pretty=oneline --abbrev-commit --all"
git config --global alias.mylog "log --pretty=format:'%h %s [%an]' --graph"
To check that they've been added correctly, first run git config --list
. You should see something like this in the midst of all your other configuration:
alias.hist=log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short