Bash/zsh function that cd to the root of git tree
Great

100% pass on shellcheck which means you're doing great with quoting everything that could be potentially problematic.
scoping variables
using [[ conditional for the if
nice explanation of what it is doing and why

Could be better

a sh-bang line at the top is a good idea for scripts, even if this would usually just be sourced during your login scripts.
Your inner function is defined with different syntax than your outer function.
You can scope and define a variable in one line.  For example: local super_root=&quot;$(git rev-parse --show-superproject-working-tree)&quot;.  This makes sure you don't fail to define a local variable or fail to scope a new variable.  And it cuts out a line of code in each case.
Reusing git_root for a variable name and the function name is confusing.  I initially wondered why you were trying to scope the function after you had just defined it.
use [[ conditional for conditional in the last line.