Created
August 26, 2022 05:14
-
-
Save siketyan/9c6694fc4f7524283f1667f0cde987e8 to your computer and use it in GitHub Desktop.
Deletes Git branches that was merged on GitHub (using gh CLI).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for b in (gh pr list -A "@me" -s merged --json headRefName | jq -r '.[].headRefName') | |
git branch -d "$b" || true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment