This small piece of code just adds the gl!
function to the official git
zshell plugin. It switches to the master
branch an pulls changes from the remote, removing locally all branches that got deleted on remote.
NOTE: consider the potential issues of deleting your local branches (aka use at your own risk)
gl!
Basically it runs the following commands:
git checkout master
git pull --prune --all
# for each branch marked as [deleted] it'll run
git branch -D BRANCH_NAME
curl --location https://bit.ly/git-extra > $ZSH/custom/git-extra.plugin.zsh