According to the doc:
If
--listis given, or if there are no non-option arguments, existing branches are listed; the current branch will be highlighted with an asterisk.Option
-rcauses the remote-tracking branches to be listed, and option-ashows both local and remote branches.If a
<pattern>is given, it is used as a shell wildcard to restrict the output to matching branches. If multiple patterns are given, a branch is shown if it matches any of the patterns. Note that when providing a<pattern>, you must use--list;
otherwise, the command is interpreted as branch creation.
But what is not specified is what is the order of the listing.
Does git branch -r --list "$PATTERN" output the branch name in some specified order?