I am using this logic and need the only branch name that match this string "AMAZONFIX".
git for-each-ref --format='%(committerdate:short) %(authordate:relative) %(refname:lstrip=3)' --sort -committerdate refs/remotes/$REMOTE_NAME | while read date branch; do
printf "%s | %s %s %s %s %s | %50s\n" $date $branch
Output result :
feature/core-xyz
dummy/AMAZON-bitMap
bugfix/AMAZONFIX-work
main/outlet-file
Excepted Output :
dummy/AMAZONFIX-bitMap
bugfix/work-place-AMAZONFIX
Only the branch name that having "AMAZONFIX"