Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

delete local branches that have been merged

# delete all merged branches (excludes master main and anything containing dev)

git branch --merged | egrep -v "(^*|master|main|dev)" | xargs git branch -d
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #delete #local #branches #merged
ADD COMMENT
Topic
Name
8+4 =