Bureaucrats, confirmed, Administrators
4,558
edits
(Cleanup your merged branches) |
m (fix formatting) |
||
Line 54: | Line 54: | ||
git branch --merged | egrep -v "(^\*|master|dev)" | xargs -I % echo 'git branch -d % ; git push --delete freephile % ;' | git branch --merged | egrep -v "(^\*|master|dev)" | xargs -I % echo 'git branch -d % ; git push --delete freephile % ;' | ||
</source> | </source> | ||
Using '''echo''' helps you look before you leap. '''%''' is the replacement string in <code>xargs</code>. Change '<code>echo</code>' to '<code>sh -c</code>' to execute. Does both local and remote prunes. | |||
== Git Log == | == Git Log == |