Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

remove all branches deleted on remote

# Shorthand for deleting localy all branches already deleted on remote
# set this alias in git.config
git config --global alias.gone "! git fetch -p && git for-each-ref --format '%(refname:short) %(upstream:track)' | awk '$2 == "[gone]" {print $1}' | xargs -r git branch -D"
# then run
git gone
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #branches #deleted #remote
ADD COMMENT
Topic
Name
6+8 =