Skip to content

Instantly share code, notes, and snippets.

@perrmadiafrrian
Created January 27, 2022 08:29
Show Gist options
  • Save perrmadiafrrian/0fbd08410e8ba831dc00de7efc9b042a to your computer and use it in GitHub Desktop.
Save perrmadiafrrian/0fbd08410e8ba831dc00de7efc9b042a to your computer and use it in GitHub Desktop.

Revisions

  1. perrmadiafrrian revised this gist Jan 27, 2022. No changes.
  2. perrmadiafrrian created this gist Jan 27, 2022.
    3 changes: 3 additions & 0 deletions remove_local_branch.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    #!/bin/sh

    git for-each-ref --format '%(refname:short)' refs/heads | grep -v "master\|main" | xargs git branch -D