0.0
No commit activity in last 3 years
No release in over 3 years
Tired of cleaning your git repository's branches manually? This gem will delete all fully merged branches in your repo that are not 1) the active branch 2) the master branch 3) any branch specified in your repo's .branches_to_keep file
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

branch-cleaner

Simple RubyGem that will delete all fully merged branches.

Disclaimer: Use at your own risk. If you use this and it deletes a branch you don't want deleted, that's on you.

Installation

From RubyGems

You can install via RubyGems.org

gem install branch_cleaner

Or install with a Gemfile:

gem 'branch_cleaner', '~> 0.1.0'

Gem From Source

Clone the repo. Then cd in to the root directory of the repository and run

gem build branch_cleaner.gemspec

gem install ./branch_cleaner-0.1.0.gem

And that's it! If you want to run the tests, just run rake.

You can also install from source with a Gemfile:

gem "branch-cleaner", :git => "git://github.com/mwflickner/branch-cleaner.git"

Usage

Via Gem

Once the gem is installed, usages is simple, just type the command cleanbranches in the Git repository of your choice and the gem will clean your branches.

Branches To Keep

Want to have some branches omitted from the cleaning? Simply just create a file called .branches_to_keep in your repository's root directory and put the names of the branches you want omitted from the cleaning. Example file here