Possibility to identify merged branches?

Issue #50 resolved
Björn Meyer created an issue

Hi,

do you know how i can identify branches that are merged in master or not merged in master?

Because i do not see any information about that when i look at the json i get back from branches or branch call.

Any tipps or suggestion? Thx a lot for your work!

Comments (3)

  1. Björn Meyer Account Deactivated reporter

    Okay i think i have to checkout repo and use something like this here. There are no infos in API about merged or not.

    $ git branch --merged
    * main
      side
    $ git branch --no-merged
      ahead
    $ 
    
  2. Alexandru Guzinschi

    I don't think you can find such an option in the Bitbucket API, but with GIT, yes, you are right:

    git branch --merged master # List branches merged into master
    
    git branch --merged # List branches merged into current HEAD
    
    git branch --no-merged # List branches that have not been merged
    

    You can also use -a flag to show local and remote branches and -r to show only remote branches. Per default git will list only local branches.

  3. Log in to comment