Inside .gitconfig
at user root, copy the following :
[alias]
delete-branch = "!sh $HOME/scripts/git_branch_name_to_clipboard.sh"
Still at user root, create a folder name scripts
and create it_branch_name_to_clipboard.sh
file in it.
Inside it_branch_name_to_clipboard.sh
, copy the following :
git branch | grep "*" | awk '{ print $2 }' | pbcopy
git checkout master
git branch -D $(pbpaste)
git pull