Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git delete all remote branch except master

git branch -r | grep 'origin' | grep -v 'master$' | grep -v 'develop$' | 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 #branch #master
ADD COMMENT
Topic
Name
6+8 =