Deleting branches already merged to main

almirsarajcic

almirsarajcic

1 year ago

0 comments

If you’ve been working on an app for a while, you probably have many stale local branches. To remove them, run this command

git branch --merged main \
  | grep -v 'main$' \
  | xargs git branch -d

Comments (0)

Sign in with GitHub to join the discussion