Skip to content

Instantly share code, notes, and snippets.

@arturkot
Last active July 9, 2025 07:57
Show Gist options
  • Save arturkot/ab1e5e53280de108a627e27c1ce7a002 to your computer and use it in GitHub Desktop.
Save arturkot/ab1e5e53280de108a627e27c1ce7a002 to your computer and use it in GitHub Desktop.
# Git-branches
function git-branches() {
local author="${1:-Artur Kot}"
git for-each-ref refs/remotes/origin/ \
--format='%(authorname)|%(refname:short)' \
| grep "^${author}|" \
| cut -d'|' -f2 \
| grep -vE '^(origin/(release|dependabot|bump|version)-)' \
| grep -v 'origin/HEAD' \
| sort
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment