If your solution to "get the current branch" is "cat out this magic data file that happens to exist in the data directory" then we have completely incompatible definitions of "user interface" and are never going to agree on this.
The question was how to do it programmatically, and there are multiple ways to do it. You might still call that user interface, but it's that's a stretch; fancy shell magic like branch-in-prompt is typically write-once.
Printing all the branches and having me scroll two screens up to find the one that's in color is not a solution to 'what branch am i on'
It prints the branch as the first line of git status: $git status # On branch Foo ...
It also ships with a 'bash-competion' file which gives you a very simple way to disply the current branch (among other things) rather simply.
And of course you can also create your own alias if it is something you wish to do often.