Delete local git branches using curses GUI written in python 3.5.2
I tend to accumulate a lot of local branches and I want a simple and quick method to delete large amounts of branches.
| Systems | Compatibility |
|---|---|
| OSX | Works |
| Ubuntu 16.04 | Works |
| Windows | Not natively, you would need to install a linux subsystem and boot from there or something else that has ncurses |
| Other linux distros | Should work if you have python3+ and native ncurses |
- Clone the repo or download it as a zip.
- Add to your favorite config file
- Note, I am using
python3because my normal python is2.7.6.
alias branchdelete='python3 /path-to-repo/branch-delete/main.py'
- Go to a git repo and type
branchdelete
- Start deleting old branches! Your
git branchwill thank you.
| Key | Description |
|---|---|
| j | Move selection down |
| k | Move selection up |
| enter | Activate selection event |
| q | Quit application (while in branch list screen) |
Start screen
After pressing enter to select a branch to delete
- your current branch is not included in the branch list
- master is not included in the branch list
- branches that need force delete i.g
git branch -D ...will fail
- config to filter your own custom branches for you cannot accidently delete an important branch
- handle
git branch -Derror - allow for force branch delete

