Skip to content

jeffmess/gitrip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WIP

Using this to learn Rust and see what all the fuss is about.

Git Rip

A command line utility which deletes merged git branches conveniently.

  • deletes all branches on your local machine merged into a branch you specify.
  • allows you to protect specific branches to never be deleted.
  • will not delete the current branch you are in.

Todo

  • Force users to add-protected-branches as we won't allow this to work until default branches are added.
  • Delete on remote.

Why

I often work on multiple branches every day and rarely delete branches I work on, review and test. This results in a messy directory where I end up cleaning things manually.

Installation

cargo install gitrip

Usage

View help

gitrip --help

Git rip allows you to add protected branches which will prevent those branches from being removed.

Add a protected directory and confirm

gitrip --add-protected-branches 'master, staging'
cat .git/config

Show local branches which have been merged into staging

gitrip --show-merged staging
180-sidekiq-upgrade

Delete branches merged into staging

gitrip --branch staging
ca-comms % git branch
* 193-current-branch
  master
  staging

About

Delete merged git branches conveniently

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages