Pruner
A small Ruby Gem to help you delete Git branches.
- Notice
- Demo
- Installation
- Usage
- Example
- Step 1
- Step 2
- Step 3
- Step 4
- Example
- Development
- Contributing
- Coding Standards
- Code of Conduct
- License
Notice
This implementation is a bit naive so be careful. If you select the current branch you have checked out, the gem will not delete it.
Demo
Installation
gem install pruner
Usage
Inside of a repository working directory:
pruner
A multiselect prompt will appear. Use the arrow keys to move between branch names, and hit the spacebar on branches you want to delete. When you have finished making your selections, hit Enter.
The gem will then delete your branches! It's as easy as that.
Example
Step 1
Run the pruner
command.
➜ pruner
Step 2
Use the spacebar to select the branches you want to delete and hit Enter.
➜ pruner
==== Select branches to delete ====
test_1, test_2, test_3
⬡ master
⬢ test_1
⬢ test_2
‣ ⬢ test_3
Step 3
Type Y and then hit Enter.
➜ pruner
==== Select branches to delete ====
test_1, test_2, test_3
==== Are you sure you want to delete these branches? ====
→ (Y/n) Y
Step 4
The branches will be deleted and the output will look like the output below.
➜ pruner
==== Select branches to delete ====
test_1, test_2, test_3
==== Are you sure you want to delete these branches? ====
→ Yes
==== Deleting Branches ====
- test_1
- test_2
- test_3
==== Branches Deleted ====
Development
After checking out the repo, run bin/setup
to install dependencies.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/andrewmcodes/pruner. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
Coding Standards
This project uses Standard to minimize bike shedding related to code formatting.
Code of Conduct
Everyone interacting in the Pruner project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
License
The gem is available as open source under the terms of the MIT License.