Open the terminal and type or copy the following commands.
git config --global alias.lol "log --graph --decorate --pretty=oneline --abbrev-commit --all"
git config --global alias.hist "log --pretty=format:'%C(yellow)%h%Creset %Cgreen%ad%Creset | %s %C(bold blue)[%an] %C(bold red)%d' --graph --date=short --color"
You can verify that the aliases have been added by running the command git config --list
.
You should see something like this in the terminal:
alias.lol=log --graph --decorate --pretty=oneline --abbrev-commit --all
alias.hist=log --pretty=format:'%C(yellow)%h%Creset %Cgreen%ad%Creset | %s %C(bold blue)[%an] %C(bold red)%d' --graph --date=short --color