I have cloned a Git repository and would like to visualize the different branches and merges. I ran the following command.

git log --graph --full-history --all --color \

to get the following output

enter image description here

and this

enter image description here

How do I read this? What is the significance of * / \ and |? Also, is there any way to filter out the only the branching and merging from the git log command by removing the code commits?


Star must show you branch, to which commit belongs (it multibranch tree)

| / \ is just an attempt to draw DAG (see d7382a7 + b5b217d together f.e)

For merge-only commits all is bad, you can try

  • --grep=pattern

Limit the commits output to ones with log message that matches the specified pattern (regular expression).

or get full log, log without merges (--no-merges) and subtract somehow 2-nd from first

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.