Showing Git branch structure

后端 未结 6 1637
长发绾君心
长发绾君心 2020-12-07 18:51

Is there a way to show only the branch structure in Git? There are a number of tools that show the commits graphically, but in my case the list is so long that it\'s impossi

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-07 19:47

    Perhaps what you want is --simplify-by-decoration option, see git log documentation:

    --simplify-by-decoration

         Commits that are referred by some branch or tag are selected.

    So it would be

    git log --graph --simplify-by-decoration --all
    

    or following VonC answer

    git log --graph --simplify-by-decoration \
       --pretty=format:'%Cred%h%Creset-%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' \
       --abbrev-commit --date=relative
    

提交回复
热议问题