Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to get list of feature branches which are merged but not deleted in bitbucket?

Dhananjay Kale February 17, 2016

How to get list of feature branches which are merged to develop but not deleted in Bitbucket?

We need to determine which feature branches are associated with features already delivered to develop and closed or resolved in JIRA.

Thank you..!!

2 answers

0 votes
Johannes Kilian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 17, 2016

I don't think there's a plugin, as your request can be done locally by basic git commands - and is nothing you would need a git-server (like bitbucket) for ...

 

Look here:

How can I know in git if a branch has been already merged into master?

or - even better - here:

Git Basics: Cleaning up excess branches

Dhananjay Kale February 21, 2016

Hi Johannes,

Actually we have many projects and each project contains lots of repositories. My initial guess is, cloning each repository and running command will take time much. Is there another way to do it like script or something else as we just need the list for the time being?

Thanks in advance.

Johannes Kilian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 22, 2016

I don't know any other way - you should write a script by yourself.

Dhananjay Kale February 28, 2016

Hi Johannes,

Thanks for all your help.

As we are checking only one repository, I tried many ways like below to get the exact list of merged branches -

1) 

git branch -r --merged develop | grep feature

--> Getting branches including 0 commits ahead with merged branches in git

2) 

git-sweep preview --master=develop

 --> Getting same result as above

I am getting the  branches which are merged into develop, but also getting the list that have 0 commits ahead.

Any idea how to skip/exclude the branches which have 0 commits ahead?

0 votes
Johannes Kilian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 17, 2016
Dhananjay Kale February 17, 2016

Hi Johannes,

Many thanks for reply smile

Is there any way to get list of feature branches merged before we delete those? or any plugin that satisfies our need?

Thanks in advance.!!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events