Display the branch structure and other important events in the Git command line interface

To set up the display of the branch structure, tags and pulls in the command line interface first create the following “alias”

git config --global alias.lgb "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset%n' --abbrev-commit --date=relative --branches"

To display the branch structure, execute the following “alias”

git lgb

This will execute the above defined “alias” and display the most important events of the branch.

Press q to exit from the display mode to the $ prompt.

Posted in Git

Leave a Reply