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

How to regularly delete branches?

Anne Pan April 19, 2022

Hi all,

I got a requirement that the company wants to regularly delete branches to keep like 3 latest versions or in a particular timeframe. Also, they want to set a limitation of the branch size. For example, over 1GB would be deleted.

Is there any plugin or solution that could help with this requirement?


Thanks in advance.

1 answer

1 accepted

1 vote
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 20, 2022

You would need an app to do it, one that allows you to create pre hooks to check size of the commit, and that allows you to run scripts to clean up branches. The one that comes to my mind is Scriptrunner.

Please note that branches are not linked to the size. Branches are just pointers, it is commits that are increasing the repository size.

Anne Pan April 21, 2022

Thanks for the reply. I'll try scriptrunner.

Like Mikael Sandberg likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events