functions: add git_prune_branches

feature/symbol-search
bretello 2020-03-17 15:03:49 +01:00
parent 6ce422c119
commit 82018c76a2
1 changed files with 7 additions and 0 deletions

View File

@ -232,6 +232,7 @@ function pipupdate(){
done
}
# unzip file to directory with the same name of the zip file (without extension)
function unzipd {
zip_file="$1"
filename=$(basename -- "$zip_file")
@ -240,6 +241,12 @@ function unzipd {
unzip -d "$name" "$zip_file"
}
# remove local branches which have been merged into master
function git_prune_branches(){
git branch --merged master | grep -v '^[ * ]*master$' | xargs git branch -d
}
# dotfiles user functions
if [[ -f $HOME/.dotfiles_functions ]]; then
source "$HOME/.dotfiles_functions"