Git - logs
git log with more visibility
Using --graph
and --format
we can quickly get a summary view of git commits in our project.
git log --graph --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%an%C(reset)%C(bold yellow)%d%C(reset) %C(dim white)- %s%C(reset)' --all
Wow! These are some good-looking logs! There’s even a semblance of a branched tree beside it.
These logs show you who has been working on what, when changes were made, and where your changes fit into the bigger picture.
--graph
adds the tree graph to the left. It is not the most stylish graph, but it helps to visualize changes in the project’s branches. Read the docs.
--format
lets you customize the format of your logs. There are preset formats to choose from, or you can write your own format like this example. Read the docs.
--all
includes all of the refs, tags, and branches in the logs (including remote branches). You might not want everything so adjust this as you see fit. Read the docs.