1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00

gentle git gone script

This is a non-forcible branch clean up script.
It is also an alternative to git_branchcleanup.nu

My first inclination was to put this in cool_oneliners because it is
one. But then I saw we have a few git scripts so wanted to follow them.

It raises the general question: should one liners be their own category
or can we derive an index of one liners, searched and sorted by topic?
This commit is contained in:
Eli Flanagan 2021-05-19 10:29:11 -04:00
parent fb3ea06aeb
commit 274b9ff879

3
git/git_gone.nu Executable file
View file

@ -0,0 +1,3 @@
# gently try to delete merged branches, excluding the checked out one
# This is an alternative to git_branchcleanup.nu
git branch --merged | lines | where $it !~ '*' | str trim | where $it != 'master' && $it != 'main' | each { git branch -d $it }