1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-22 03:21:30 +01:00

functions: add git_prune_branches

This commit is contained in:
bretello 2020-03-17 15:03:49 +01:00
parent 6ce422c119
commit 82018c76a2

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"