git查看各个branch之间的关系图

来源:互联网 发布:网络销售聊天技巧 编辑:程序博客网 时间:2024/05/22 06:53

提供两种方法:


1.  使用Git log命令

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


说明:

--decorate 标记会让git log显示每个commit的引用(如:分支、tag等) 

--oneline 一行显示

--simplify-by-decoration 只显示被branch或tag引用的commit

--all 表示显示所有的branch,这里也可以选择,比如我指向显示分支ABC的关系,则将--all替换为branchA branchB branchC


2. 使用gitk工具

gitk --simplify-by-decoration --all

参考:

http://stackoverflow.com/questions/5298972/relationship-between-n-git-branches

git log --help

0 0