可视化git分支依赖性 [英] Visualize git branch dependency

查看:152
本文介绍了可视化git分支依赖性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有工具可以显示特定分支已合并到的分支?例如,如果 A已合并为 B和 C,但未合并为 D,那么如何输出 B和 C?我只需要分支名称。

Is there a tool that can show me what branches a specific branch has been merged into? For example, if "A" has been merged into "B" and "C" but not "D", how do I output "B" and "C"? I'd only need the branch names.

推荐答案

如果您是指图形工具,则 gitk 似乎是一个不错的起点。

If you mean a graphic tool, gitk would seem to be a good starting point.

或者,您可能更喜欢对于某些需求非常有用的CLI,请尝试一下:

Alternatively, you might prefer the CLI which is very useful for some needs, give it a try :

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

要更具体地解决问题如何知道哪些分支合并到分支A中?

And to adress more specifically the question "How to know which branches are merged into branch A?"

git branch --contains A

这篇关于可视化git分支依赖性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆