Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.18 KB

README.rst

File metadata and controls

51 lines (34 loc) · 1.18 KB

git-sweep

A command-line tool that helps you clean up Git branches that have been merged into master.

One of the best features of Git is cheap branches. There are existing branching models like GitHub Flow and Vincent Driessen's git-flow that describe methods for using this feature.

The problem

Your master branch is typically where all your code lands. All features branches are meant to be short-lived and merged into master once they are completed.

As time marches on, you can build up a long list of branches that are no longer needed. They've been merged into master, what do we do with them now?

The answer

Using git-sweep you can safely remove remote branches that have been merged into master.

Try it for yourself (safely)

$ git-sweep preview
$ git-sweep cleanup
Are you sure you wish to delete 15 remote branches (y/n)?
Instructions for having your team sync their branches

Requirements:

  • Git >= 1.7
  • Python >= 2.6