• Stars
    star
    20
  • Rank 1,121,974 (Top 23 %)
  • Language
    Ruby
  • License
    MIT License
  • Created almost 5 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CLI tool to delete Git branches

StandardRB Tests


Logo

Pruner

A small Ruby Gem to help you delete Git branches.


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

asciicast

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.

More Repositories

1

obsidian-beginner-vault-template

A minimal template for your first Obsidian vault aimed at setting good defaults.
56
star
2

awesome-lucky

A collection of awesome Lucky libraries, tools, frameworks and resources
44
star
3

standardrb-action

StandardRB Action: A GitHub Action to run StandardRB against your code!
Ruby
33
star
4

warp-one-dark-darker

Warp theme based on One Dark Darker
26
star
5

shotgun

Ready to go Rails App with TailwindCSS, ViewComponent, Devise, and more!
Ruby
25
star
6

bundler-audit-action

Bundler Audit Action
Dockerfile
17
star
7

stimulus_reflex_table_filter

Demo app showing how you can filter a table in a Ruby on Rails app with StimulusReflex
Ruby
17
star
8

awesome-bridgetown

A curated list of awesome things related to Bridgetown
13
star
9

rails-extension-power-pack

An extension pack of my favorite VS Code extensions for Ruby on Rails development.
Ruby
11
star
10

forem_lite

A simple tool to help you get articles from Forem/Dev.to
Ruby
11
star
11

andrewm.codes

My personal website built on Bridgetown
HTML
11
star
12

dishwasher

A CLI tool to help you easily delete forked repositories.
Ruby
10
star
13

awesome-stars

An Awesome List of my Awesome Stars
9
star
14

bridgetown-inline-svg

ARCHIVED migrated to bridgetown-svg-inliner
Ruby
9
star
15

bridgetown-netlify-cms-starter

A template to help you get started with Bridgetown + Netlify CMS
JavaScript
8
star
16

bridgetown-gh-pages-action

ARCHIVED See link below, this action is now longer needed following the release of Bridgetown V1
Shell
7
star
17

andrewmcodes

andrewmcodes public readme
6
star
18

andrewmcodes_gem

My gem card
Ruby
4
star
19

haml-lint-action

A GitHub Action that lints your HAML code with HAML Lint!
Ruby
4
star
20

alfred-themes

My personal Alfred 5 themes
4
star
21

redux-on-rails

I DIDNT WANT THIS BUT YOU MADE ME DO IT
Ruby
3
star
22

.github

Default community health files for @andrewmcodes
3
star
23

bridgetown-torchlight-demo

A demo Bridgetown website that has Torchlight syntax highlighting configured!
JavaScript
3
star
24

dotfiles

My personal dot and settings files
Shell
3
star
25

release-please-demo

Ruby
2
star
26

turbo_debug

Ruby
2
star
27

vercel_ruby

WIP Vercel Serverless Functions written in Ruby
Ruby
2
star
28

.dotfiles-update

A temporary repo where I am rebuilding my dotfiles
Shell
2
star
29

rails-cable-route-bug-reproduction

Ruby
1
star
30

actions

Shared GitHub Actions
Shell
1
star
31

prettier-config

My personal Prettier configuration
JavaScript
1
star
32

bridgetown-gh-pages-demo

Demo of the new gh-pages configuration in Bridgetown v1.0
JavaScript
1
star
33

github-actions

MOVED TO andrewmcodes/actions
1
star
34

vscode-tailwindcss-extension-pack

An extension pack for VSCode of extensions for developing with Tailwind CSS.
1
star
35

remote-ruby-vault

Obsidian vault of Remote Ruby episodes for personal research
JavaScript
1
star
36

bridgetown-esbuild-minifySyntax

Benchmarking usage of minifySyntax with esbuild and Bridgetown
JavaScript
1
star
37

warp-radix

Warp theme based on the Radix color system
1
star
38

advent_of_code

Solutions to Advent of Code
Ruby
1
star