Showing Git branch structure

后端 未结 6 1634
长发绾君心
长发绾君心 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:49

    To get more information on how a particular branch relates to other branches in your repository and remotes, you can use git wtf which is an add on script by William Morgan: http://git-wt-commit.rubyforge.org/

    It produces summary information like:

    $ git wtf
    Local branch: master
    [x] in sync with remote
    Remote branch: origin/master (git@gitorious.org:willgit/mainline.git)
    [x] in sync with local
    
    Feature branches:
    { } origin/experimental is NOT merged in (1 commit ahead)
        - some tweaks i'm playing around with [80e5da1]
    { } origin/dont-assume-origin is NOT merged in (1 commit ahead)
        - guess primary remote repo from git config instead of assuming "origin" [23c96f1]
    

    (example taken from the above URL).

提交回复
热议问题