Viewing full version tree in git

GitGitk

Git Problem Overview


I am using the command line version of Git and gitk. I want to see the full version tree, not just the part that is reachable from the currently checked out version. Is it possible?

Git Solutions


Solution 1 - Git

if you happen to not have a graphical interface available you can also print out the commit graph on the command line:

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

if this command complains with an invalid option --oneline, use:

git log --pretty=oneline --graph --decorate --all

Solution 2 - Git

  1. When I'm in my work place with terminal only, I use:

git log --oneline --graph --color --all --decorate

enter image description here

  1. When the OS support GUI, I use:

gitk --all

enter image description here

  1. When I'm in my home Windows PC, I use my own GitVersionTree

enter image description here

Solution 3 - Git

You can try the following:

gitk --all

You can tell gitk what to display using anything that git rev-list understands, so if you just want a few branches, you can do:

gitk master origin/master origin/experiment

... or more exotic things like:

gitk --simplify-by-decoration --all

Solution 4 - Git

There is a very good answer to the same question.
Adding following lines to "~/.gitconfig":

[alias]
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''          %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !"git lg1"

Solution 5 - Git

If you don't need branch or tag name:
git log --oneline --graph --all --no-decorate

If you don't even need color (to avoid tty color sequence):
git log --oneline --graph --all --no-decorate --no-color

And a handy alias (in .gitconfig) to make life easier:

[alias]
  tree = log --oneline --graph --all --no-decorate

Only last option takes effect, so it's even possible to override your alias:

git tree --decorate

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionpetersohnView Question on Stackoverflow
Solution 1 - GitknittlView Answer on Stackoverflow
Solution 2 - GitchecksumView Answer on Stackoverflow
Solution 3 - GitMark LongairView Answer on Stackoverflow
Solution 4 - GitDaniil ShevelevView Answer on Stackoverflow
Solution 5 - GitclarkttfuView Answer on Stackoverflow