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 an explanation of the options and placeholder used in the --pretty
format (exhaustive list are 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 username
%an - Commit username
%C(auto) - to use colors defined in [color] section
%Creset - to reset color
%d - –decorate (branch & tag names)
%s - commit message
%ad - author date (will follow –date directive) (and not commiter date)
%an - author name (can be %cn for commiter name)