Created
July 25, 2023 12:24
-
-
Save pablogrs/7cc8d2515e11186607a410cb19fbf267 to your computer and use it in GitHub Desktop.
Delete local branches that have been merged in GitHub Pull Request
This file contains hidden or 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 x in $(gh pr list --state merged --json headRefName --limit 400 | jq --raw-output ".[].headRefName"); do | |
git branch -D $x | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment