提供两种方法:
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
本文介绍两种查看Git中多个分支间关系的方法:一是使用git log命令,通过特定参数展示分支、标签引用的commit历史;二是利用gitk图形工具,简化显示所有分支的装饰信息。
5208

被折叠的 条评论
为什么被折叠?



