Skip to main content

CLI tool for deleting Github branches

Project description

The problem

From time to time if you have many forks and do many pull requests it is inevitable that you will have stale branches. And as time marches on the number of these branches across forks can become big.

The answer

git-wipe is simple command line tool to cleanup your Github fork branches.


$ pip install git-wipe


In order to use git-wipe first you need to create your Personal Access Token.

You can set this token to your environment variable:

$ export GIT_WIPE_TOKEN=your_access_token

And then you can easily:

$ git-wipe cleanup
Searching for branches. This may take a while...
Founded branches:


Total: 4
Delete these branches? [y/N]: y

Other options

--token              instead of environment
--preview            just to preview merged branches
--timeout            set connection timeout. Default 30 seconds
--skip-repository    skip repository you don't want to search. Multiple
--skip-branch        skip branch you don't want to delete. Multiple
--no-interaction     do not ask any interactive question


$ git-wipe cleanup --skip-repository=repo_1 --skip-branch=develop --no-interaction

This command will clean all merged branches without interaction, except from fork with name ‘repo_1’ and except all branches with name ‘develop’


Only forks where you are owner will be involved in search. Also master branches will never be deleted!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for git-wipe, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size git-wipe-0.1.2.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page