Skip to content

Commit

Permalink
update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
migbash committed Feb 2, 2023
1 parent 7b598fd commit e55b476
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,7 @@ git-post-main-pr:
git reset --hard main

git-del-branches-w-origin:
echo 'Deleting branches not present in origin'
git fetch -p ; git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -D
echo 'Deleting branches not present in origin + /dev'
# Original command (below) is without \(...\) syntax
# git fetch -p ; git branch -r | awk '{print $$1}' | egrep -v -f /dev/fd/0 <\(git branch -vv | grep origin\) | awk '{print $$1}' | xargs git branch -D
git branch --merged | grep -v "*" | grep -v "main" | xargs git branch -d

0 comments on commit e55b476

Please sign in to comment.