Search code examples
gitbranchgit-log

Visualize git branch dependency


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.


Solution

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

    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
    

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

    git branch --contains A