Show pretty log with branch graph
suggest change[alias]
logp=log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
lg = log --graph --date-order --first-parent \
--pretty=format:'%C(auto)%h%Creset %C(auto)%d%Creset %s %C(green)(%ad) %C(bold cyan)<%an>%Creset'
lgb = log --graph --date-order --branches --first-parent \
--pretty=format:'%C(auto)%h%Creset %C(auto)%d%Creset %s %C(green)(%ad) %C(bold cyan)<%an>%Creset'
lga = log --graph --date-order --all \
--pretty=format:'%C(auto)%h%Creset %C(auto)%d%Creset %s %C(green)(%ad) %C(bold cyan)<%an>%Creset'
Here is an explanation of the options and placeholders used in the --pretty format (an exhaustive list is available with git help log):
–graph - draw the commit tree
–date-order - use commit timestamp order when possible
–first-parent - follow only the first parent on merge node.
–branches - show all local branches (by default, only current branch is shown)
–all - show all local and remotes branches
%h - hash value for commit (abbreviated)
%ad - Date stamp (author)
%an - author name
%cn - committer name
%C(auto) - to use colors defined in [color] section
%Creset - to reset color
%d - –decorate (branch & tag names)
%s - commit message
%ad - author date (follows --date, not the committer date)
%an - author name (%cn is the committer name)
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents