mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-22 03:21:30 +01:00
zsh: update git_prune_branches
This commit is contained in:
parent
c6b110b325
commit
fc4972dab3
|
@ -230,9 +230,10 @@ function unzipd {
|
|||
unzip -d "$name" "$zip_file"
|
||||
}
|
||||
|
||||
# remove local branches which have been merged into master
|
||||
# remove local branches which have been merged into master/main
|
||||
function git_prune_branches(){
|
||||
git branch --merged master | grep -v '^[ * ]*master$' | xargs git branch -d
|
||||
local main=$(git_main_branch)
|
||||
git branch --merged $main | grep -v '^[ * ]*'$main'$' | xargs git branch -d
|
||||
}
|
||||
|
||||
fvim() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user