I'm looking for a git command like this:

```
git show-branch-value refs/heads/master
cf574d699a8bd67fc0b851cda3452c4d18c4223540a

```

What I want it to do is show the value of the selected branch.

Is there such a command?