Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deleting merged branches in GitLab periodically?

Tags:

gitlab

I've searched some documentation but couldn't find exactly what I was looking for.

Does GitLab provide a feature which allows deleting all branches which have been merged recently? Either as a feature of GitLab itself or by using a third-party plugin or similar?

like image 281
Robert Strauch Avatar asked Oct 16 '25 08:10

Robert Strauch


1 Answers

Gitlab exposes API resource to delete all non-protected branches merged into the project’s default branch (master per default).

To delete them periodically in gitlab, you can create a pipeline in a .gitlab-ci.yml and schedule it at the frequency you want.

like image 88
Nicolas Pepinster Avatar answered Oct 19 '25 13:10

Nicolas Pepinster



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!