How can it possible to get all names of some remote origin branches?
I started from --remote --list
options, but got redundant origin/HEAD -> origi
The existing answer both uses something explicitly not wanted in the question (sed) and is a remote command.
I found this that avoids both those issues, uses only local git commands and a pipe:
git rev-parse --remotes=origin | git name-rev --name-only --stdin
Update: Not really optimal either, but keeping it if someone knows how to improve it. It lists the full remote including the /remotes/origin prefix if you have no local branch, but only the local name if you have. In addition it seem to skip some refs if there are several pointing to the same SHA1.