Save the (Git) Environment

As we use feature branching in our day-to-day workflow, we’ve got lots of branches left behind after work was complete. Mainly code that’s already merged into master…and so I’ve written a simple ruby script that:

1 Checks current branch
2 Warns if the current branch is not master
3 Prunes remotes
4 Checks merged branches
5 Shows the list of branches that will be removed
6 Asks for a confirmation to delete these branches

They should be safe to delete!

Here is the script:

Leave a Reply

Please Login to comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.