Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git delete all remote branches except master

git branch -r | grep 'origin' | grep -v 'master$' | grep -v HEAD | cut -d/ -f2- | while read line; do git push origin :heads/$line; done;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #git #delete #remote #branches #master
ADD COMMENT
Topic
Name
1+9 =