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.
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?
Using git-sweep
you can safely remove remote branches that have been merged into master.
$ 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
- Git >= 1.7
- Python >= 2.6