Crates.io | git-snip |
lib.rs | git-snip |
version | 0.2.0 |
created_at | 2023-12-30 21:37:53.5802+00 |
updated_at | 2025-08-09 21:53:05.902852+00 |
description | Snip local Git branches that do not exist on the remote. |
homepage | https://gitlab.com/radek-sprta/git-snip |
repository | https://gitlab.com/radek-sprta/git-snip |
max_upload_size | |
id | 1084436 |
size | 60,472 |
git-snip is a CLI utility to delete orphaned local branches that have no upstream.
You can install git-snip by building it with cargo. Run the following command:
cargo install --target-dir ~/.local git-snip
This will create a binary in ~/.local/bin/git-snip
.
In a git repository, run:
git snip
It will ask to confirm the branches to delete. If you want to delete all branches without confirmation, run:
git snip --yes
To run git-snip automatically, run it with the --install-hook
flag:
git snip --install-hook
GNU General Public License v3.0