Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git delete local branch

$ git for-each-ref --format '%(refname:short) %(upstream:track)' |
  awk '$2 == "[gone]" {print $1}' |
  xargs -r git branch -D

Deleted branch fix-typo (was 7b57d4f).
Deleted branch grammar-fix (was 01257bd).
Source by www.erikschierboom.com #
 
PREVIOUS NEXT
Tagged: #git #delete #local #branch
ADD COMMENT
Topic
Name
8+3 =