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:
parent
fb3ea06aeb
commit
274b9ff879
1 changed files with 3 additions and 0 deletions
3
git/git_gone.nu
Executable file
3
git/git_gone.nu
Executable 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 }
|
Loading…
Add table
Add a link
Reference in a new issue