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

提供两种方法:

  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

  1. 使用gitk工具

gitk –simplify-by-decoration –all

参考:

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

git log –help

猜你喜欢

转载自blog.csdn.net/qq_32106647/article/details/79893475