Usage:
To show the history of the current branch
$ git hist
To show the graph of all branches (including remotes)
$ git hist --all
To show the relationship between two or more branches
$ git hist master devel
To show all local branches
$ git hist --branches
Add --topo-order to sort commits topologically, instead of by date (default in this alias)
Benefits:
- It looks just like plain --decorate, so with separate colors for different branch names
- It adds committer email
- It adds commit relative and absolute date
- Also, it sorts commits by date
Let us look at the setup:
$ git config --global alias.hist "log --graph --date-order --date=short \ --pretty=format:'%C(auto)%h%d %C(reset)%s %C(bold blue)Î %C(reset)%C(green)%cr (Í)'"