2

How to Show Git Branch Graph in Terminal

 2 years ago
source link: https://cuda-chen.github.io/git/2021/08/14/git-pretty-branch-graph.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

How to Show Git Branch Graph in Terminal

Aug 14, 2021

Sometimes I would like to watch the history of my Git commits as well as the branches. What’s more, I would like to see these changes in terminal so that I don’t need to install then execute other programs.

As a Git user, I can watch the Git commits by typing git log. However, sometimes I want to watch the branch graph so that I can know which branch merges to another branch.

As such, you can type this command:

$ git log --all --decorate --oneline --graph

And this stackoverflow answer [^1] provides an interesting rhythm – A DOG – and a meme to memorize it:

git a dog meme

This delighted dog with rainbow background will help you to memorize A DOG command :)

Thanks you stackoverflow, you save me the day!

Reference

[^1] https://stackoverflow.com/a/35075021


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK