The git log
is a powerful command which shows commit history.
$ git log
However since I am a more visual thinking
person I need some visually appealing form to see my commits.
Tree
Here is the solution for my need:
$ git log --oneline --decorate --graph --all
which will give the format like below:
Absolutely easier to grasp what is going on with the history.
Tree with date and author
If you also want to see date
and author
use this:
$ git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --all
The output:
Aliases
It will be beneficial to use aliases for them:
alias glt='git log --oneline --decorate --graph --all'
alias glta='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --all'
All done!
Top comments (0)