Mercurial has a way of printing the root directory (that contains .hg) via
hg root
Is there something equivalent in git to get the director
If you use a shell framework, there might already be a shell alias available:
$ grt
in oh-my-zsh (68k) (cd $(git rev-parse --show-toplevel || echo ".")
)$ git-root
in prezto (8.8k) (displays the path to the working tree root)$ g..
zimfw (1k) (changes the current directory to the top level of the working tree.)