I don't think you can use wildcards directly that way, but you can use git for-each-ref to match branch names. For example, look at the output:
git for-each-ref --format="%(refname)" refs/remotes/origin/share/*bran*
(This is intentionally larger than what is needed in the template so I can demonstrate that wildcards work. Instead, you can do refs/remotes/origin/share/ .)
So, as one command, you can do:
git merge $(git for-each-ref --format="%(refname)" refs/remotes/origin/share/)
... to make an octopus axis from all of these branches.
To be honest, it's hard for me to think about a situation in which I would not prefer to do anymore:
git merge origin/share/branch1 git merge origin/share/branch2 git merge origin/share/another-branch
... or perhaps if there are many branches:
for c in $(git for-each-ref --format="%(refname)" refs/remotes/origin/share/) do git merge $c || break done
source share