Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git delete local branches not on remote

git fetch -p && for branch in $(git branch -vv | grep ': gone]' | awk '{print $1}'); do git branch -D $branch; done
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #git #delete #local #branches #remote
ADD COMMENT
Topic
Name
8+7 =