Viewing full version tree in git

前端 未结 5 1169
遇见更好的自我
遇见更好的自我 2020-11-30 16:42

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 p

5条回答
  •  醉梦人生
    2020-11-30 17:22

    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 the key sequence when piped out):
    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

提交回复
热议问题