When I'm in some subdirectory of a git repository, I use this command to jump to the repo root:
alias gtop="cd \$(git rev-parse --show-toplevel)"
When I'm in some subdirectory of a git repository, I use this command to jump to the repo root:
alias gtop="cd \$(git rev-parse --show-toplevel)"