This works for me with Git 2.1.10 using the repository cloned from GitHub:
git branch -r --points-at refs/remotes/origin/HEAD
The main problem with this approach is that it lists each remote branch pointing to HEAD; however, the output includes a hint:
origin/HEAD -> origin/master origin/master origin/test123
So, you can post-process the output with grep or similar to find one that has an arrow:
git branch -r --points-at refs/remotes/origin/HEAD | grep '\->' | cut -d' ' -f5 | cut -d/ -f2
source share